summaryrefslogtreecommitdiff
path: root/apt/debfile.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-09-07 13:26:35 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-09-07 13:26:35 +0200
commit6c5feb6111db81f4e7ec871275daa736a6fc793c (patch)
tree47d06e08e7236be2d700e28af0e2aad4ccb562d9 /apt/debfile.py
parent33bbf9482fe486aab915768fc74609d303c1e1f9 (diff)
parentb390a866fc3af9e7050148f11fb558fd52a8a703 (diff)
downloadpython-apt-6c5feb6111db81f4e7ec871275daa736a6fc793c.tar.gz
* merged patch from Samuel Lidén Borell to fix crash if there utf8
in the control file (LP: #624290) and add test * apt/cache.py: - add "sources_list" parameter to cache.update() to force updating a single sources.list entry only * debian/control: - add missing build-depends on python-debian (needed to run the tests for apt.debfile.DebPackage() * apt/debfile: - don't fail if we conflict with the pkgs we are reinstalling
Diffstat (limited to 'apt/debfile.py')
-rw-r--r--apt/debfile.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/apt/debfile.py b/apt/debfile.py
index f4a31379..7728ed21 100644
--- a/apt/debfile.py
+++ b/apt/debfile.py
@@ -66,7 +66,7 @@ class DebPackage(object):
self._debfile = apt_inst.DebFile(open(self.filename))
control = self._debfile.control.extractdata("control")
# hm, 'replace' is probably better but python2.6 test fail with that
- self._sections = apt_pkg.TagSection(control.decode("UTF-8", 'ignore'))
+ self._sections = apt_pkg.TagSection(control)
self.pkgname = self._sections["Package"]
def __getitem__(self, key):
@@ -347,7 +347,8 @@ class DebPackage(object):
'targetver' : c_or.target_ver }
self._cache.op_progress.done()
return False
- if c_or.target_pkg.name in provides:
+ if (c_or.target_pkg.name in provides and
+ self.pkgname != pkg.name):
self._dbg(2, "would break (conflicts) %s" % provides)
self._failure_string += _("Breaks existing package '%(pkgname)s' that conflict: '%(targetpkg)s'. But the '%(debfile)s' provides it via: '%(provides)s'") % {
'provides' : ",".join(provides),