From 9f4ab37f5f7736c112fbbb1c157321cdc3c0570f Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Wed, 27 Aug 2008 14:48:14 +0200 Subject: For empt --- apt/package.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apt/package.py b/apt/package.py index 3b26fb2b..3eb692d8 100644 --- a/apt/package.py +++ b/apt/package.py @@ -376,16 +376,19 @@ class Package(object): installedSize = property(installedSize) def installedFiles(self): - """ Return the list of files installed on the system by the package """ + """ + Return the list of unicode names of the files which have + been installed by this package + """ if not self.isInstalled: - return None + return [] path = "/var/lib/dpkg/info/%s.list" % self.name try: list = open(path) - files = list.read().split("\n") + files = list.read().decode().split("\n") list.close() except: - return None + return [] return files installedFiles = property(installedFiles) -- cgit v1.2.3 From bfad41ee6621f13278b29dda8a2c12997c23e9d9 Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Thu, 28 Aug 2008 08:56:14 +0200 Subject: Fix: not installed files can have installed files --- apt/package.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/apt/package.py b/apt/package.py index 3eb692d8..f63c13de 100644 --- a/apt/package.py +++ b/apt/package.py @@ -380,8 +380,6 @@ class Package(object): Return the list of unicode names of the files which have been installed by this package """ - if not self.isInstalled: - return [] path = "/var/lib/dpkg/info/%s.list" % self.name try: list = open(path) -- cgit v1.2.3 From b9b064ea89b5948a11b2ab91188eaafb6610d114 Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Fri, 29 Aug 2008 10:19:01 +0200 Subject: Remove not used imports in debfile --- apt/debfile.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apt/debfile.py b/apt/debfile.py index 4fcd6ec0..a0a8e016 100644 --- a/apt/debfile.py +++ b/apt/debfile.py @@ -23,12 +23,9 @@ import warnings warnings.filterwarnings("ignore", "apt API not stable yet", FutureWarning) import apt_inst, apt_pkg -import apt import sys import os from gettext import gettext as _ -from cache import Cache -from progress import DpkgInstallProgress # Constants for comparing the local package file with the version in the cache (VERSION_NONE, @@ -507,6 +504,8 @@ class DscSrcPackage(DebPackage): return self._satisfyDepends(self.depends) if __name__ == "__main__": + from cache import Cache + from progress import DpkgInstallProgress cache = Cache() -- cgit v1.2.3 From e260803ebac317471ad185e2efffd1c4b09c887c Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Fri, 29 Aug 2008 10:19:47 +0200 Subject: debfile: fix a silly error that made me some headache and returned the depends in getConflicts() --- apt/debfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt/debfile.py b/apt/debfile.py index a0a8e016..b1d436cd 100644 --- a/apt/debfile.py +++ b/apt/debfile.py @@ -211,7 +211,7 @@ class DebPackage(object): WARNING: This method will is deprecated. Please use the attribute DebPackage.depends instead. """ - return self.depends + return self.conflicts def conflicts(self): """ -- cgit v1.2.3