← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/bug-1332047 into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/bug-1332047 into lp:launchpad.

Commit message:
Let partner -proposed build-depend on itself. Previously the self-dependency was always release-only.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/bug-1332047/+merge/244510

Let partner -proposed build-depend on itself. Previously the self-dependency was always release-only.

_has_published_binaries previously only checked that there was a binary published in *any* pocket, since only primary archives were meant to have multiple pockets and we always publish the primary archive's pockets together. This might want an (archive, distroarchseries, pocket, status) index later, but I suspect the existing (archive, distroarchseries, status) will work fine.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/bug-1332047 into lp:launchpad.
=== modified file 'lib/lp/soyuz/adapters/archivedependencies.py'
--- lib/lp/soyuz/adapters/archivedependencies.py	2014-05-06 15:48:14 +0000
+++ lib/lp/soyuz/adapters/archivedependencies.py	2014-12-11 21:50:32 +0000
@@ -149,9 +149,10 @@
 
     # Add implicit self-dependency for non-primary contexts.
     if archive.purpose in ALLOW_RELEASE_BUILDS:
-        deps.append((
-            archive, distro_arch_series, PackagePublishingPocket.RELEASE,
-            get_components_for_context(component, pocket)))
+        for expanded_pocket in pocket_dependencies[pocket]:
+            deps.append(
+                (archive, distro_arch_series, expanded_pocket,
+                 get_components_for_context(component, expanded_pocket)))
 
     primary_component = get_primary_current_component(
         archive, distro_series, source_package_name)
@@ -258,7 +259,7 @@
         return True
 
     published_binaries = archive.getAllPublishedBinaries(
-        distroarchseries=distroarchseries,
+        distroarchseries=distroarchseries, pocket=pocket,
         status=PackagePublishingStatus.PUBLISHED)
     return not published_binaries.is_empty()
 

=== modified file 'lib/lp/soyuz/doc/archive-dependencies.txt'
--- lib/lp/soyuz/doc/archive-dependencies.txt	2014-01-30 15:04:06 +0000
+++ lib/lp/soyuz/doc/archive-dependencies.txt	2014-12-11 21:50:32 +0000
@@ -440,6 +440,28 @@
     deb http://archive.launchpad.dev/ubuntu hoary-updates
         main restricted universe multiverse
 
+PARTNER's PROPOSED pocket builds against itself, but still uses the
+default UPDATES dependency for PRIMARY unless overriden by
+ArchiveDependency.
+
+    >>> proposed_source = test_publisher.getPubSource(
+    ...     version='1.2', archive=partner, component='partner',
+    ...     pocket=PackagePublishingPocket.PROPOSED)
+    >>> unused = test_publisher.getPubBinaries(
+    ...     archive=partner, distroseries=proposed_source.distroseries,
+    ...     pocket=PackagePublishingPocket.PROPOSED,
+    ...     status=PackagePublishingStatus.PUBLISHED)
+    >>> [partner_proposed_build] = proposed_source.createMissingBuilds()
+
+    >>> print_building_sources_list(partner_proposed_build)
+    deb http://archive.launchpad.dev/ubuntu-partner hoary partner
+    deb http://archive.launchpad.dev/ubuntu-partner hoary-proposed partner
+    deb http://archive.launchpad.dev/ubuntu hoary
+        main restricted universe multiverse
+    deb http://archive.launchpad.dev/ubuntu hoary-security
+        main restricted universe multiverse
+    deb http://archive.launchpad.dev/ubuntu hoary-updates
+        main restricted universe multiverse
 
 == External build dependencies ==
 


Follow ups