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
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
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
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
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
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
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
def get_pkgs(self, pkgname): return [ APTPackage(self.cache[p]) for p in sorted(self.cache.keys()) if pkgname in p.lower() ]
def get_pkg(self, pkgname): return APTPackage(self.cache[pkgname])
def get_changes(self): changes = self.cache.get_changes() return [APTPackage(p) for p in changes]
def get_dependencies(self, pkgname): deps = getalldeps(self.cache, pkgname) return [APTPackage(p, cache=self.cache) for p in deps]
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
def get_initvm_pkglist(): cache = Cache() cache.open() pkglist = [APTPackage(p) for p in cache if p.is_installed] return pkglist