← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Michael Terry has proposed merging lp:~mterry/launchpad-buildd/prefer-install into lp:launchpad-buildd.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1030893 in launchpad-buildd: "sbuild will not install a missing build-dep in some cases"
  https://bugs.launchpad.net/launchpad-buildd/+bug/1030893

For more details, see:
https://code.launchpad.net/~mterry/launchpad-buildd/prefer-install/+merge/117318

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.
-- 
https://code.launchpad.net/~mterry/launchpad-buildd/prefer-install/+merge/117318
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~mterry/launchpad-buildd/prefer-install into lp:launchpad-buildd.
=== modified file 'sbuild'
--- sbuild	2012-03-22 10:07:59 +0000
+++ sbuild	2012-07-30 18:37:20 +0000
@@ -2078,14 +2078,14 @@
 			}
 		}
 		if (!$is_satisfied) {
-			if ($upgradeable) {
+			if ($installable) {
+				print "using $installable for install\n" if $main::debug;
+				push( @$pos_list, $installable );
+			}
+			elsif ($upgradeable) {
 				print "using $upgradeable for upgrade\n" if $main::debug;
 				push( @$pos_list, $upgradeable );
 			}
-			elsif ($installable) {
-				print "using $installable for install\n" if $main::debug;
-				push( @$pos_list, $installable );
-			}
 			elsif ($downgradeable) {
 				print PLOG "To satisfy this dependency the package(s) would ",
 						   "have\n",


Follow ups