Merge lp:~cjwatson/launchpad/bpb-external-dependencies-2 into lp:launchpad

Proposed by Colin Watson
Status: Merged
Merged at revision: 17883
Proposed branch: lp:~cjwatson/launchpad/bpb-external-dependencies-2
Merge into: lp:launchpad
Diff against target: 50 lines (+24/-2)
2 files modified
lib/lp/soyuz/adapters/archivedependencies.py (+9/-2)
lib/lp/soyuz/doc/archive-dependencies.txt (+15/-0)
To merge this branch: bzr merge lp:~cjwatson/launchpad/bpb-external-dependencies-2
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+281914@code.launchpad.net

Commit message

Actually honour BinaryPackageBuild.external_dependencies.

Description of the change

Actually honour BinaryPackageBuild.external_dependencies. The previous change accepted it but didn't dispatch it to builders.

To post a comment you must log in.
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/soyuz/adapters/archivedependencies.py'
--- lib/lp/soyuz/adapters/archivedependencies.py 2015-08-04 11:03:04 +0000
+++ lib/lp/soyuz/adapters/archivedependencies.py 2016-01-07 18:38:35 +0000
@@ -1,4 +1,4 @@
1# Copyright 2009-2014 Canonical Ltd. This software is licensed under the1# Copyright 2009-2016 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
33
4"""Archive dependencies helper function.4"""Archive dependencies helper function.
@@ -243,7 +243,14 @@
243 _get_sources_list_for_dependencies(deps)243 _get_sources_list_for_dependencies(deps)
244244
245 external_dep_lines = []245 external_dep_lines = []
246 # Append external sources_list lines for this archive if it's246 # Append external sources.list lines for this build if specified. No
247 # series substitution is needed here, so we don't have to worry about
248 # malformedness.
249 dependencies = build.external_dependencies
250 if dependencies is not None:
251 for line in dependencies.splitlines():
252 external_dep_lines.append(line)
253 # Append external sources.list lines for this archive if it's
247 # specified in the configuration.254 # specified in the configuration.
248 try:255 try:
249 dependencies = build.archive.external_dependencies256 dependencies = build.archive.external_dependencies
250257
=== modified file 'lib/lp/soyuz/doc/archive-dependencies.txt'
--- lib/lp/soyuz/doc/archive-dependencies.txt 2015-08-04 11:03:04 +0000
+++ lib/lp/soyuz/doc/archive-dependencies.txt 2016-01-07 18:38:35 +0000
@@ -501,6 +501,21 @@
501501
502 >>> cprov.archive.external_dependencies = None502 >>> cprov.archive.external_dependencies = None
503503
504We can also set external dependencies for a single build.
505
506 >>> a_build.external_dependencies = (
507 ... u"deb http://user:pass@repository foo bar")
508 >>> print_building_sources_list(a_build)
509 deb http://ppa.launchpad.dev/cprov/ppa/ubuntu hoary main
510 deb http://user:pass@repository foo bar
511 deb http://archive.launchpad.dev/ubuntu hoary
512 main restricted universe multiverse
513 deb http://archive.launchpad.dev/ubuntu hoary-security
514 main restricted universe multiverse
515 deb http://archive.launchpad.dev/ubuntu hoary-updates
516 main restricted universe multiverse
517 >>> a_build.external_dependencies = None
518
504519
505== Build tools sources.list entries ==520== Build tools sources.list entries ==
506521