diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-01-13 14:36:58 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-01-13 14:36:58 +0100 |
| commit | 71aad7e28bbaf1ee8efdad77ebfb4e4c0fd0ec26 (patch) | |
| tree | 4db1908b3d8d4896d39b7788488f2bfb141e138f /apt | |
| parent | 469ac5b1a7c069d3822bd36cb74958ce3de19c87 (diff) | |
| parent | 1da29f8e4e578e00e5703a7db7dc8e8d3c7a08bd (diff) | |
| download | python-apt-71aad7e28bbaf1ee8efdad77ebfb4e4c0fd0ec26.tar.gz | |
* apt/progress/__init__.py:
- Fix InstallProgress.updateInterface() to cope with read() returning 0
on non-blocking file descriptors (LP: #491027).
* apt/cache.py:
- improved docstring for the cache
- add "enhances" property
* data/templates/Ubuntu.info.in:
- add lucid
* python/cache.cc:
- add UntranslatedDepType attribute to DependencyType
- add DepTypeEnum that returns a value from
{DepDepends, DepPreDepends, ...}
* python/apt_pkgmodule.cc:
- add DepDpkgBreaks, DepEnhances constants
* doc/source/apt_pkg/{cache.rst, index.rst}:
- update documentation as well
Diffstat (limited to 'apt')
| -rw-r--r-- | apt/cache.py | 9 | ||||
| -rw-r--r-- | apt/package.py | 5 | ||||
| -rw-r--r-- | apt/progress/__init__.py | 5 |
3 files changed, 17 insertions, 2 deletions
diff --git a/apt/cache.py b/apt/cache.py index fa6c404c..ae6f2fcc 100644 --- a/apt/cache.py +++ b/apt/cache.py @@ -43,7 +43,14 @@ class Cache(object): """Dictionary-like package cache. This class has all the packages that are available in it's - dictionary + dictionary. + + Keyword arguments: + progress -- a OpProgress object + rootdir -- a alternative root directory. if that is given + the system sources.list and system lists/ files are + not read, only files relative to the given rootdir + memonly -- build the cache in memory only """ def __init__(self, progress=None, rootdir=None, memonly=False): diff --git a/apt/package.py b/apt/package.py index 8d3be1b0..f33871c6 100644 --- a/apt/package.py +++ b/apt/package.py @@ -379,6 +379,11 @@ class Version(object): return depends_list @property + def enhances(self): + """Return the list of enhances for the package version.""" + return self.get_dependencies("Enhances") + + @property def dependencies(self): """Return the dependencies of the package version.""" return self.get_dependencies("PreDepends", "Depends") diff --git a/apt/progress/__init__.py b/apt/progress/__init__.py index 8a9eb86f..8694de77 100644 --- a/apt/progress/__init__.py +++ b/apt/progress/__init__.py @@ -246,7 +246,10 @@ class InstallProgress(DumbInstallProgress): return try: while not self.read.endswith("\n"): - self.read += os.read(self.statusfd.fileno(), 1) + r = os.read(self.statusfd.fileno(), 1) + if not r: + return + self.read += r except OSError, (errno_, errstr): # resource temporarly unavailable is ignored if errno_ != errno.EAGAIN and errno_ != errno.EWOULDBLOCK: |
