Example #1
0
    def perform_full_import(self, dirname):
        self.set_main_path(dirname)
        dbdata = self.parse_main_xml()
        self.start_schema()
        self.import_apt_sources(dbdata.aptsources)
        self.report_total_suites(len(dbdata.suites))
        for suite in dbdata.suites:
            self.make_suite(suite)
            suitedir = self.main_path / suite.name
            self._import_traits(suite.name, dbdata.get_traits(suite.name), suitedir)
            self.report_suite_imported(suite.name)

        self.import_all_families()
        self.import_all_profiles()
        machinedb = self.main_path / "machine_database.xml"
        if machinedb.isfile():
            mh = MachineHandler(self.conn)
            mh.restore_machine_database(self.main_path)
        default_environment_basename = "default-environment"
        filename = self.main_path / default_environment_basename
        if filename.isfile():
            # similar code exists in kde/environ.py
            defenv = DefaultEnvironment(self.conn)
            newcfg = RawConfigParser()
            newcfg.read(filename)
            defenv.update(newcfg)
Example #2
0
 def perform_full_import(self, dirname):
     self.set_main_path(dirname)
     dbdata = self.parse_main_xml()
     self.start_schema()
     self.import_apt_sources(dbdata.aptsources)
     self.report_total_suites(len(dbdata.suites))
     for suite in dbdata.suites:
         self.make_suite(suite)
         suitedir = self.main_path / suite.name
         self._import_traits(suite.name, dbdata.get_traits(suite.name), suitedir)
         self.report_suite_imported(suite.name)
         
     self.import_all_families()
     self.import_all_profiles()
     machinedb = self.main_path / 'machine_database.xml'
     if machinedb.isfile():
         mh = MachineHandler(self.conn)
         mh.restore_machine_database(self.main_path)
     default_environment_basename = 'default-environment'
     filename = self.main_path / default_environment_basename
     if filename.isfile():
         # similar code exists in kde/environ.py
         defenv = DefaultEnvironment(self.conn)
         newcfg = RawConfigParser()
         newcfg.read(filename)
         defenv.update(newcfg)
Example #3
0
 def create(self, filename):
     self.parse_xml(filename)
     self.start_schema()
     for suite in self.dbdata.suites:
         self.insert_traits(suite.name)
     self.insert_families()
     self.insert_profiles()
     # use the machine handler to insert
     # machine types and such
     mh = MachineHandler(self.conn)
     mh.restore_machine_database(self.main_path)
Example #4
0
    def create(self, filename):
        self.parse_xml(filename)
        self.start_schema()
        self.insert_apt_sources()
        self._sync_suites()

        for suite in self.dbdata.suites:
            self.insert_traits(suite.name)
        self.insert_families()
        self.insert_profiles()
        # use the machine handler to insert
        # machine types and such
        if os.path.isfile(os.path.join(self.main_path, "machine_database.xml")):
            mh = MachineHandler(self.conn)
            mh.restore_machine_database(self.main_path)
Example #5
0
 def create(self, filename):
     self.parse_xml(filename)
     self.start_schema()
     self.insert_apt_sources()
     self._sync_suites()
     
     for suite in self.dbdata.suites:
         self.insert_traits(suite.name)
     self.insert_families()
     self.insert_profiles()
     # use the machine handler to insert
     # machine types and such
     if os.path.isfile(os.path.join(self.main_path, 'machine_database.xml')):
         mh = MachineHandler(self.conn)
         mh.restore_machine_database(self.main_path)