Merge lp:~feldgendler/python-apt/829138 into lp:ubuntu/precise/python-apt

Proposed by Alexey Feldgendler
Status: Merged
Merge reported by: Michael Vogt
Merged at revision: not available
Proposed branch: lp:~feldgendler/python-apt/829138
Merge into: lp:ubuntu/precise/python-apt
Diff against target: 20 lines (+2/-1)
1 file modified
apt/debfile.py (+2/-1)
To merge this branch: bzr merge lp:~feldgendler/python-apt/829138
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Ubuntu branches Pending
Review via email: mp+84799@code.launchpad.net

Description of the change

Fixes LP #829138 by requiring a matching architecture when checking for conflicts.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks! That looks great!

review: Approve
Revision history for this message
Michael Vogt (mvo) wrote :

This is part of the python-apt upload in ubuntu 12.04 (precise) now. Thanks again for the fix!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'apt/debfile.py'
2--- apt/debfile.py 2011-05-24 10:08:56 +0000
3+++ apt/debfile.py 2011-12-07 16:50:33 +0000
4@@ -308,6 +308,7 @@
5 size = float(len(self._cache))
6 steps = max(int(size/50), 1)
7 debver = self._sections["Version"]
8+ debarch = self._sections["Architecture"]
9 # store what we provide so that we can later check against that
10 provides = [ x[0][0] for x in self.provides]
11 for (i, pkg) in enumerate(self._cache):
12@@ -336,7 +337,7 @@
13 if "Conflicts" in ver.depends_list:
14 for conflicts_ver_list in ver.depends_list["Conflicts"]:
15 for c_or in conflicts_ver_list:
16- if c_or.target_pkg.name == self.pkgname:
17+ if c_or.target_pkg.name == self.pkgname and c_or.target_pkg.architecture == debarch:
18 if apt_pkg.check_dep(debver, c_or.comp_type, c_or.target_ver):
19 self._dbg(2, "would break (conflicts) %s" % pkg.name)
20 # TRANSLATORS: the first '%s' is the package that conflicts, the second the packagename that it conflicts with (so the name of the deb the user tries to install), the third is the relation (e.g. >=) and the last is the version for the relation

Subscribers

People subscribed via source and target branches