Logo Search packages:      
Sourcecode: jockey version File versions  Download package

def jockey::ui::AbstractUI::_update_installed_packages (   self,
  add,
  remove 
) [private]

Update backup_dir/installed_packages list of driver packages.

This keeps a log of all packages that jockey installed for supporting
drivers, so that distribution installers on live CDs can push them into
the installed system as well.

add and remove are lists which package names to add/remove from it.

Definition at line 506 of file ui.py.

00506                                                      :
        '''Update backup_dir/installed_packages list of driver packages.
        
        This keeps a log of all packages that jockey installed for supporting
        drivers, so that distribution installers on live CDs can push them into
        the installed system as well.

        add and remove are lists which package names to add/remove from it.
        '''
        # get current list
        current = set()
        path = os.path.join(oslib.OSLib.inst.backup_dir, 'installed_packages')
        if os.path.exists(path):
            for line in open(path):
                line = line.strip()
                if line:
                    current.add(line)
    
        current = current.union(add).difference(remove)
        
        if current:
            # write it back
            f = open(path, 'w')
            for p in current:
                print >> f, p
            f.close()
        else:
            # delete it if it is empty
            if os.path.exists(path):
                os.unlink(path)

    def download_url(self, url, filename=None, data=None):


Generated by  Doxygen 1.6.0   Back to index