summaryrefslogtreecommitdiff
path: root/apt/debfile.py
diff options
context:
space:
mode:
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),