コード例 #1
0
    def get_pkglist(self, section):
        if section == 'all':
            ret = [APTPackage(p) for p in self.cache]
        else:
            ret = [APTPackage(p) for p in self.cache if p.section == section]

        return ret
コード例 #2
0
 def get_upgradeable(self, section='all'):
     if section == 'all':
         ret = [ APTPackage(p) for p in self.cache if p.is_upgradable]
     else:
         ret = [ APTPackage(p) for p in self.cache if (p.section == section
             and p.is_upgradable)]
     return ret
コード例 #3
0
 def get_marked_install( self, section='all' ):
     if section == 'all':
         ret = [APTPackage(p) for p in self.cache if p.marked_install]
     else:
         ret = [APTPackage(p) for p in self.cache if (p.section == section
             and p.marked_install)]
     return ret
コード例 #4
0
 def get_installed_pkgs(self, section='all'):
     if section == 'all':
         pl = [APTPackage(p) for p in self.cache if p.is_installed]
     else:
         pl = [
             APTPackage(p) for p in self.cache
             if (p.section == section and p.is_installed)
         ]
     return pl
コード例 #5
0
 def get_installed_pkgs(self, section='all'):
     # avoid DeprecationWarning: MD5Hash is deprecated, use Hashes instead
     # triggerd by python-apt
     with warnings.catch_warnings():
         warnings.filterwarnings("ignore", category=DeprecationWarning)
         if section == 'all':
             pl = [APTPackage(p) for p in self.cache if p.is_installed]
         else:
             pl = [
                 APTPackage(p) for p in self.cache
                 if (p.section == section and p.is_installed)
             ]
         return pl
コード例 #6
0
def get_initvm_pkglist ():
    with warnings.catch_warnings():
        warnings.filterwarnings("ignore",category=DeprecationWarning)
        cache = Cache ()
        cache.open ()
        pkglist = [APTPackage (p) for p in cache if p.is_installed]
        try:
            eb = APTPackage( cache ['elbe-bootstrap'] )
            pkglist.append (eb)
        # elbe bootstrap is not installed on pc running elbe
        except KeyError:
            pass

    return pkglist
コード例 #7
0
ファイル: dump.py プロジェクト: jneuhauser/elbe
def get_initvm_pkglist():
    with warnings.catch_warnings():
        warnings.filterwarnings("ignore", category=DeprecationWarning)
        cache = Cache()
        cache.open()
        pkglist = [APTPackage(p) for p in cache if p.is_installed]

    return pkglist
コード例 #8
0
 def get_pkgs(self, pkgname):
     return [
         APTPackage(self.cache[p]) for p in sorted(self.cache.keys())
         if pkgname in p.lower()
     ]
コード例 #9
0
 def get_pkg(self, pkgname):
     return APTPackage(self.cache[pkgname])
コード例 #10
0
 def get_changes(self):
     changes = self.cache.get_changes()
     return [APTPackage(p) for p in changes]
コード例 #11
0
 def get_dependencies(self, pkgname):
     deps = getalldeps(self.cache, pkgname)
     return [APTPackage(p, cache=self.cache) for p in deps]
コード例 #12
0
ファイル: dump.py プロジェクト: lwalewski/elbe
def get_initvm_pkglist():
    cache = Cache()
    cache.open()
    pkglist = [APTPackage(p) for p in cache if p.is_installed]
    pkglist.append(APTPackage(cache['elbe-bootstrap']))
    return pkglist
コード例 #13
0
ファイル: dump.py プロジェクト: Ecordonnier/elbe
def get_initvm_pkglist():
    cache = Cache()
    cache.open()
    pkglist = [APTPackage(p) for p in cache if p.is_installed]

    return pkglist