diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-11-24 10:34:07 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-11-24 10:34:07 +0100 |
| commit | a1afca943e88af27b17ff5196dc8563170aec832 (patch) | |
| tree | 2f53e15f49a0a6e6c2aefd766d7a3bbb68ae8c20 /apt | |
| parent | 85665b9162f8b9c087e6f7fb4eade14bf2b236c2 (diff) | |
| parent | 0454e03e4c58d4ff63538badbf1b17276fe31494 (diff) | |
| download | python-apt-a1afca943e88af27b17ff5196dc8563170aec832.tar.gz | |
* re-merged from debian/sid
* Final 0.7.100 release; targeted at Squeeze.
* apt/debfile.py:
- Replace (undocumented) use of python-debian debfile.DebFile API with
the equivalent apt_inst.DebFile API (Closes: #603043)
* apt/package.py:
- Fix docstring of Package.mark_delete() (Closes: #599042)
* doc:
- Various documentation updates.
- The C++ API/ABI is stable now.
* po
- Update sl.po (Closes: #603359)
Diffstat (limited to 'apt')
| -rw-r--r-- | apt/debfile.py | 22 | ||||
| -rw-r--r-- | apt/package.py | 2 |
2 files changed, 8 insertions, 16 deletions
diff --git a/apt/debfile.py b/apt/debfile.py index 25a45e98..0a740c63 100644 --- a/apt/debfile.py +++ b/apt/debfile.py @@ -531,7 +531,7 @@ class DebPackage(object): return s def _get_content(self, part, name, auto_decompress=True, auto_hex=True): - data = part.get_content(name) + data = part.extractdata(name) # check for zip content if name.endswith(".gz") and auto_decompress: io = StringIO(data) @@ -550,24 +550,16 @@ class DebPackage(object): def control_content(self, name): """ return the content of a specific control.tar.gz file """ try: - from debian.debfile import DebFile - except: - raise Exception(_("Python-debian module not available")) - control = DebFile(self.filename).control - if name in control: - return self._get_content(control, name) - return "" + return self._get_content(self._debfile.control, name) + except LookupError: + return "" def data_content(self, name): """ return the content of a specific control.tar.gz file """ try: - from debian.debfile import DebFile - except: - raise Exception(_("Python-debian module not available")) - data = DebFile(self.filename).data - if name in data: - return self._get_content(data, name) - return "" + return self._get_content(self._debfile.data, name) + except LookupError: + return "" def _dbg(self, level, msg): """Write debugging output to sys.stderr.""" diff --git a/apt/package.py b/apt/package.py index 871c1e16..475edb76 100644 --- a/apt/package.py +++ b/apt/package.py @@ -1170,7 +1170,7 @@ class Package(object): @deprecated_args def mark_delete(self, auto_fix=True, purge=False): - """Mark a package for install. + """Mark a package for deletion. If *auto_fix* is ``True``, the resolver will be run, trying to fix broken packages. This is the default. |
