summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Heinlein <sebi@glatzor.de>2008-08-29 13:39:50 +0200
committerSebastian Heinlein <sebi@glatzor.de>2008-08-29 13:39:50 +0200
commit12a80ede382e83bec4ebc7ff22aa25c97f809dd2 (patch)
treed4b506dab97ecd58952f6cf0dd55c37f6a9fe332
parent3415fb5d900cb75ac8159c6afd7301d09ad774ea (diff)
parente260803ebac317471ad185e2efffd1c4b09c887c (diff)
downloadpython-apt-12a80ede382e83bec4ebc7ff22aa25c97f809dd2.tar.gz
Push train work
-rw-r--r--apt/debfile.py7
-rw-r--r--apt/package.py11
-rw-r--r--apt/progress.py2
3 files changed, 10 insertions, 10 deletions
diff --git a/apt/debfile.py b/apt/debfile.py
index 4fcd6ec0..b1d436cd 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,
@@ -214,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):
"""
@@ -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()
diff --git a/apt/package.py b/apt/package.py
index 3b26fb2b..f63c13de 100644
--- a/apt/package.py
+++ b/apt/package.py
@@ -376,16 +376,17 @@ class Package(object):
installedSize = property(installedSize)
def installedFiles(self):
- """ Return the list of files installed on the system by the package """
- if not self.isInstalled:
- return None
+ """
+ Return the list of unicode names of the files which have
+ been installed by this package
+ """
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)
diff --git a/apt/progress.py b/apt/progress.py
index 09a3fb06..b7e7c8dc 100644
--- a/apt/progress.py
+++ b/apt/progress.py
@@ -208,7 +208,7 @@ class InstallProgress(DumbInstallProgress):
(pid, res) = os.waitpid(self.child_pid,os.WNOHANG)
if pid == self.child_pid:
break
- return os.WEXITSTATUS(res)
+ return res
def run(self, pm):
pid = self.fork()
if pid == 0: