launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #19844
[Merge] lp:~cjwatson/launchpad/bpb-external-dependencies-2 into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/bpb-external-dependencies-2 into lp:launchpad.
Commit message:
Actually honour BinaryPackageBuild.external_dependencies.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #671190 in Launchpad itself: "cannot specify specific chroot for a build"
https://bugs.launchpad.net/launchpad/+bug/671190
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/bpb-external-dependencies-2/+merge/281914
Actually honour BinaryPackageBuild.external_dependencies. The previous change accepted it but didn't dispatch it to builders.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/bpb-external-dependencies-2 into lp:launchpad.
=== 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 @@
-# Copyright 2009-2014 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Archive dependencies helper function.
@@ -243,7 +243,14 @@
_get_sources_list_for_dependencies(deps)
external_dep_lines = []
- # Append external sources_list lines for this archive if it's
+ # Append external sources.list lines for this build if specified. No
+ # series substitution is needed here, so we don't have to worry about
+ # malformedness.
+ dependencies = build.external_dependencies
+ if dependencies is not None:
+ for line in dependencies.splitlines():
+ external_dep_lines.append(line)
+ # Append external sources.list lines for this archive if it's
# specified in the configuration.
try:
dependencies = build.archive.external_dependencies
=== 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 @@
>>> cprov.archive.external_dependencies = None
+We can also set external dependencies for a single build.
+
+ >>> a_build.external_dependencies = (
+ ... u"deb http://user:pass@repository foo bar")
+ >>> print_building_sources_list(a_build)
+ deb http://ppa.launchpad.dev/cprov/ppa/ubuntu hoary main
+ deb http://user:pass@repository foo bar
+ 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
+ >>> a_build.external_dependencies = None
+
== Build tools sources.list entries ==
Follow ups