Merge lp:~mterry/launchpad-buildd/prefer-install into lp:launchpad-buildd

Proposed by Michael Terry
Status: Rejected
Rejected by: Colin Watson
Proposed branch: lp:~mterry/launchpad-buildd/prefer-install
Merge into: lp:launchpad-buildd
Diff against target: 23 lines (+5/-5)
1 file modified
sbuild (+5/-5)
To merge this branch: bzr merge lp:~mterry/launchpad-buildd/prefer-install
Reviewer Review Type Date Requested Status
Colin Watson (community) Disapprove
Richard Harding (community) Approve
Adam Conrad Pending
William Grant Pending
Review via email: mp+117318@code.launchpad.net

Description of the change

This is an attempt to fix bug 1030893, which is causing some bogus dep-waits.

From looking at the sbuild fork code, what happens is that libsocket-perl gets marked as installable and perl gets marked as upgradeable. But the code prefers to upgrade over install, so it tries to upgrade the existing perl instead.

I'm curious in what situations would an upgrade be useful? Any package in the chroot should already be the latest version, since the first part of the build upgrades the packages in the chroot.

So with that logic in mind, this branch prefers installing new packages over upgrading existing ones.

To post a comment you must log in.
Revision history for this message
Richard Harding (rharding) wrote :

This makes sense to me, but it seems like there would have been a reason for setting it up this way originally. So I'm going to ok, but ask William (lucky since he's got the most commits recently against launchpad-buildd) to give an ok as well.

review: Approve
Revision history for this message
Michael Terry (mterry) wrote :

poke

Revision history for this message
Michael Terry (mterry) wrote :

William suggested Adam Conrad should be the one to review it, so punting this to him.

Revision history for this message
Adam Conrad (adconrad) wrote :

I have to follow the logic through and do some testing, but a naive glance at this would suggest this might just trade one set of incorrect behaviours for another (like, say, installing lib-foo-perl even if perl is a high enough version to satisfy an | dep).

Revision history for this message
Michael Terry (mterry) wrote :

I *believe* if that happened, we don't go into this branch of code. That is, this code is only reached if we can't satisfy the or-dependency at all with installed software.

And all packages should be at their latest archive versions by this point (we early do an apt-get upgrade I believe), so any packages marked as upgradeable should never actually be able to be upgraded were we to try it.

Revision history for this message
Colin Watson (cjwatson) wrote :

We now use a backport of the stock sbuild from Ubuntu which lets apt-get do the hard work here and doesn't suffer from this problem, so there's no more need for this change.

review: Disapprove

Unmerged revisions

55. By Michael Terry

prefer installing new packages to upgrading existing chroot packages

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sbuild'
2--- sbuild 2012-03-22 10:07:59 +0000
3+++ sbuild 2012-07-30 18:37:20 +0000
4@@ -2078,14 +2078,14 @@
5 }
6 }
7 if (!$is_satisfied) {
8- if ($upgradeable) {
9+ if ($installable) {
10+ print "using $installable for install\n" if $main::debug;
11+ push( @$pos_list, $installable );
12+ }
13+ elsif ($upgradeable) {
14 print "using $upgradeable for upgrade\n" if $main::debug;
15 push( @$pos_list, $upgradeable );
16 }
17- elsif ($installable) {
18- print "using $installable for install\n" if $main::debug;
19- push( @$pos_list, $installable );
20- }
21 elsif ($downgradeable) {
22 print PLOG "To satisfy this dependency the package(s) would ",
23 "have\n",

Subscribers

People subscribed via source and target branches