launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #19870
[Merge] lp:~cjwatson/launchpad/build-depends-arch into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/build-depends-arch into lp:launchpad.
Commit message:
Model and show SourcePackageRelease.builddependsarch and SourcePackageRelease.build_conflicts_arch.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1489044 in Launchpad itself: "add Build-Depends-Arch support"
https://bugs.launchpad.net/launchpad/+bug/1489044
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/build-depends-arch/+merge/282345
Model and show SourcePackageRelease.builddependsarch and SourcePackageRelease.build_conflicts_arch. See https://code.launchpad.net/~cjwatson/launchpad/db-build-depends-arch/+merge/282344 for rationale.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/build-depends-arch into lp:launchpad.
=== modified file 'lib/lp/archivepublisher/indices.py'
--- lib/lp/archivepublisher/indices.py 2014-10-31 13:28:31 +0000
+++ lib/lp/archivepublisher/indices.py 2016-01-12 17:05:26 +0000
@@ -118,8 +118,10 @@
fields.append('Maintainer', spr.dsc_maintainer_rfc822)
fields.append('Build-Depends', spr.builddepends)
fields.append('Build-Depends-Indep', spr.builddependsindep)
+ fields.append('Build-Depends-Arch', spr.builddependsarch)
fields.append('Build-Conflicts', spr.build_conflicts)
fields.append('Build-Conflicts-Indep', spr.build_conflicts_indep)
+ fields.append('Build-Conflicts-Arch', spr.build_conflicts_arch)
fields.append('Architecture', spr.architecturehintlist)
fields.append('Standards-Version', spr.dsc_standards_version)
fields.append('Format', spr.dsc_format)
=== modified file 'lib/lp/archivepublisher/tests/test_indices.py'
--- lib/lp/archivepublisher/tests/test_indices.py 2014-10-31 13:05:52 +0000
+++ lib/lp/archivepublisher/tests/test_indices.py 2016-01-12 17:05:26 +0000
@@ -64,7 +64,9 @@
"""
pub_source = self.getPubSource(
builddepends='fooish', builddependsindep='pyfoo',
- build_conflicts='bar', build_conflicts_indep='pybar')
+ builddependsarch='libfoo-dev',
+ build_conflicts='bar', build_conflicts_indep='pybar',
+ build_conflicts_arch='libbar-dev')
self.assertEqual(
[u'Package: foo',
@@ -74,8 +76,10 @@
u'Maintainer: Foo Bar <foo@xxxxxxx>',
u'Build-Depends: fooish',
u'Build-Depends-Indep: pyfoo',
+ u'Build-Depends-Arch: libfoo-dev',
u'Build-Conflicts: bar',
u'Build-Conflicts-Indep: pybar',
+ u'Build-Conflicts-Arch: libbar-dev',
u'Architecture: all',
u'Standards-Version: 3.6.2',
u'Format: 1.0',
@@ -99,7 +103,9 @@
"""
pub_source = self.getPubSource(
builddepends='fooish', builddependsindep='pyfoo',
+ builddependsarch='libfoo-dev',
build_conflicts='bar', build_conflicts_indep='pybar',
+ build_conflicts_arch='libbar-dev',
user_defined_fields=[
("Python-Version", "< 1.5"),
("CHECKSUMS-SHA1", "BLAH")])
@@ -112,8 +118,10 @@
u'Maintainer: Foo Bar <foo@xxxxxxx>',
u'Build-Depends: fooish',
u'Build-Depends-Indep: pyfoo',
+ u'Build-Depends-Arch: libfoo-dev',
u'Build-Conflicts: bar',
u'Build-Conflicts-Indep: pybar',
+ u'Build-Conflicts-Arch: libbar-dev',
u'Architecture: all',
u'Standards-Version: 3.6.2',
u'Format: 1.0',
=== modified file 'lib/lp/archiveuploader/dscfile.py'
--- lib/lp/archiveuploader/dscfile.py 2015-07-30 07:46:08 +0000
+++ lib/lp/archiveuploader/dscfile.py 2016-01-12 17:05:26 +0000
@@ -661,8 +661,10 @@
maintainer=self.maintainer['person'],
builddepends=encoded.get('Build-Depends', ''),
builddependsindep=encoded.get('Build-Depends-Indep', ''),
+ builddependsarch=encoded.get('Build-Depends-Arch', ''),
build_conflicts=encoded.get('Build-Conflicts', ''),
build_conflicts_indep=encoded.get('Build-Conflicts-Indep', ''),
+ build_conflicts_arch=encoded.get('Build-Conflicts-Arch', ''),
architecturehintlist=encoded.get('Architecture', ''),
creator=self.changes.changed_by['person'],
urgency=self.changes.converted_urgency,
=== modified file 'lib/lp/archiveuploader/tests/nascentupload.txt'
--- lib/lp/archiveuploader/tests/nascentupload.txt 2015-12-30 23:34:34 +0000
+++ lib/lp/archiveuploader/tests/nascentupload.txt 2016-01-12 17:05:26 +0000
@@ -373,12 +373,18 @@
>>> ed_spr.builddependsindep
u''
+ >>> ed_spr.builddependsarch
+ u''
+
>>> ed_spr.build_conflicts
u'foo-bar'
>>> ed_spr.build_conflicts_indep
u'biscuit'
+ >>> ed_spr.build_conflicts_arch
+ u''
+
The content of 'debian/copyright' is stored as the 'copyright'
attribute of SourcePackageRelease (note that its content is filtered
with encoding.guess()).
=== modified file 'lib/lp/registry/browser/sourcepackage.py'
--- lib/lp/registry/browser/sourcepackage.py 2015-10-01 17:32:41 +0000
+++ lib/lp/registry/browser/sourcepackage.py 2016-01-12 17:05:26 +0000
@@ -520,6 +520,11 @@
self.context.currentrelease.builddependsindep)
@property
+ def builddependsarch(self):
+ return self._relationship_parser(
+ self.context.currentrelease.builddependsarch)
+
+ @property
def build_conflicts(self):
return self._relationship_parser(
self.context.currentrelease.build_conflicts)
@@ -529,6 +534,11 @@
return self._relationship_parser(
self.context.currentrelease.build_conflicts_indep)
+ @property
+ def build_conflicts_arch(self):
+ return self._relationship_parser(
+ self.context.currentrelease.build_conflicts_arch)
+
def requestCountry(self):
return ICountry(self.request, None)
=== modified file 'lib/lp/registry/interfaces/distroseries.py'
--- lib/lp/registry/interfaces/distroseries.py 2015-10-13 13:22:08 +0000
+++ lib/lp/registry/interfaces/distroseries.py 2016-01-12 17:05:26 +0000
@@ -646,13 +646,13 @@
def createUploadedSourcePackageRelease(
sourcepackagename, version, maintainer, builddepends,
- builddependsindep, architecturehintlist, component, creator, urgency,
- changelog, changelog_entry, dsc, dscsigningkey, section,
- dsc_maintainer_rfc822, dsc_standards_version, dsc_format,
- dsc_binaries, archive, copyright, build_conflicts,
- build_conflicts_indep, dateuploaded=None,
- source_package_recipe_build=None, user_defined_fields=None,
- homepage=None):
+ builddependsindep, builddependsarch, architecturehintlist,
+ component, creator, urgency, changelog, changelog_entry, dsc,
+ dscsigningkey, section, dsc_maintainer_rfc822,
+ dsc_standards_version, dsc_format, dsc_binaries, archive, copyright,
+ build_conflicts, build_conflicts_indep, build_conflicts_arch,
+ dateuploaded=None, source_package_recipe_build=None,
+ user_defined_fields=None, homepage=None):
"""Create an uploads `SourcePackageRelease`.
Set this distroseries set to be the uploadeddistroseries.
@@ -678,9 +678,12 @@
:param builddepends: string, DSC build dependencies
:param builddependsindep: string, DSC architecture independent build
dependencies.
+ :param builddependsarch: string, DSC architecture dependent build
+ dependencies.
:param build_conflicts: string, DSC Build-Conflicts content
:param build_conflicts_indep: string, DSC Build-Conflicts-Indep
content
+ :param build_conflicts_arch: string, DSC Build-Conflicts-Arch content
:param dsc_maintainer_rfc822: string, DSC maintainer field
:param dsc_standards_version: string, DSC standards version field
:param dsc_format: string, DSC format version field
=== modified file 'lib/lp/registry/model/distroseries.py'
--- lib/lp/registry/model/distroseries.py 2015-12-15 14:12:25 +0000
+++ lib/lp/registry/model/distroseries.py 2016-01-12 17:05:26 +0000
@@ -1142,11 +1142,11 @@
def createUploadedSourcePackageRelease(
self, sourcepackagename, version, maintainer, builddepends,
- builddependsindep, architecturehintlist, component, creator,
- urgency, changelog, changelog_entry, dsc, dscsigningkey, section,
- dsc_maintainer_rfc822, dsc_standards_version, dsc_format,
+ builddependsindep, builddependsarch, architecturehintlist, component,
+ creator, urgency, changelog, changelog_entry, dsc, dscsigningkey,
+ section, dsc_maintainer_rfc822, dsc_standards_version, dsc_format,
dsc_binaries, archive, copyright, build_conflicts,
- build_conflicts_indep, dateuploaded=DEFAULT,
+ build_conflicts_indep, build_conflicts_arch, dateuploaded=DEFAULT,
source_package_recipe_build=None, user_defined_fields=None,
homepage=None):
"""See `IDistroSeries`."""
@@ -1154,6 +1154,7 @@
upload_distroseries=self, sourcepackagename=sourcepackagename,
version=version, maintainer=maintainer, dateuploaded=dateuploaded,
builddepends=builddepends, builddependsindep=builddependsindep,
+ builddependsarch=builddependsarch,
architecturehintlist=architecturehintlist, component=component,
creator=creator, urgency=urgency, changelog=changelog,
changelog_entry=changelog_entry, dsc=dsc,
@@ -1164,6 +1165,7 @@
dsc_format=dsc_format, dsc_binaries=dsc_binaries,
build_conflicts=build_conflicts,
build_conflicts_indep=build_conflicts_indep,
+ build_conflicts_arch=build_conflicts_arch,
source_package_recipe_build=source_package_recipe_build,
user_defined_fields=user_defined_fields, homepage=homepage)
=== modified file 'lib/lp/registry/templates/sourcepackage-index.pt'
--- lib/lp/registry/templates/sourcepackage-index.pt 2015-11-24 01:44:28 +0000
+++ lib/lp/registry/templates/sourcepackage-index.pt 2016-01-12 17:05:26 +0000
@@ -124,6 +124,12 @@
<tal:block tal:condition="relationships/has_items"
replace="structure relationships/@@+render-list"/>
</td>
+ <td id="dependsarch"
+ tal:define="relationships view/builddependsarch">
+ <h3>Platform-dependent build dependencies</h3>
+ <tal:block tal:condition="relationships/has_items"
+ replace="structure relationships/@@+render-list"/>
+ </td>
</tr>
<tr>
<td id="conflicts" tal:define="relationships view/build_conflicts">
@@ -137,6 +143,12 @@
<tal:block tal:condition="relationships/has_items"
replace="structure relationships/@@+render-list"/>
</td>
+ <td id="conflictsarch"
+ tal:define="relationships view/build_conflicts_arch">
+ <h3>Platform-dependent build dependencies</h3>
+ <tal:block tal:condition="relationships/has_items"
+ replace="structure relationships/@@+render-list"/>
+ </td>
</tr>
</table>
</div>
=== modified file 'lib/lp/soyuz/doc/package-relationship.txt'
--- lib/lp/soyuz/doc/package-relationship.txt 2015-07-29 16:55:28 +0000
+++ lib/lp/soyuz/doc/package-relationship.txt 2016-01-12 17:05:26 +0000
@@ -1,12 +1,16 @@
= Package Relationship Model =
We call "package relationship" the DSC field which describes relation
-between the package in question and others availble:
+between the package in question and others available:
For sources DSC provides:
* builddepends
* builddependsindep
+ * builddependsarch
+ * build_conflicts
+ * build_conflicts_indep
+ * build_conflicts_arch
For binaries we have:
=== modified file 'lib/lp/soyuz/doc/sourcepackagerelease.txt'
--- lib/lp/soyuz/doc/sourcepackagerelease.txt 2014-07-14 16:47:15 +0000
+++ lib/lp/soyuz/doc/sourcepackagerelease.txt 2016-01-12 17:05:26 +0000
@@ -143,6 +143,7 @@
>>> archhintlist = 'any'
>>> builddepends = 'cdbs, debhelper (>= 4.1.0), libsysfs-dev, libhal-dev'
>>> builddependsindep = ''
+ >>> builddependsarch = ''
>>> dsc_maintainer_rfc822 = 'Foo Bar <foo@xxxxxxx>'
>>> dsc_standards_version = '2.6.1'
>>> dsc_format = '1.0'
@@ -155,11 +156,12 @@
>>> new_spr = hoary.createUploadedSourcePackageRelease(
... arg_name, version, arg_maintainer,
- ... builddepends, builddependsindep, archhintlist, arg_comp, arg_creator,
- ... arg_urgency, changelog, changelog_entry, dsc, arg_key, arg_sect,
- ... dsc_maintainer_rfc822, dsc_standards_version, dsc_format,
- ... dsc_binaries, archive, copyright=copyright,
+ ... builddepends, builddependsindep, builddependsarch, archhintlist,
+ ... arg_comp, arg_creator, arg_urgency, changelog, changelog_entry, dsc,
+ ... arg_key, arg_sect, dsc_maintainer_rfc822, dsc_standards_version,
+ ... dsc_format, dsc_binaries, archive, copyright=copyright,
... build_conflicts=None, build_conflicts_indep=None,
+ ... build_conflicts_arch=None,
... source_package_recipe_build=arg_recipebuild)
>>> new_spr.upload_distroseries.name
=== modified file 'lib/lp/soyuz/interfaces/sourcepackagerelease.py'
--- lib/lp/soyuz/interfaces/sourcepackagerelease.py 2015-09-28 17:38:45 +0000
+++ lib/lp/soyuz/interfaces/sourcepackagerelease.py 2016-01-12 17:05:26 +0000
@@ -50,10 +50,15 @@
"package depends to build"),
required=False)
builddependsindep = TextLine(
- title=_("DSC build depends"),
+ title=_("DSC arch-independent build depends"),
description=_("Same as builddepends, but the list is of "
"arch-independent packages"),
required=False)
+ builddependsarch = TextLine(
+ title=_("DSC arch-dependent build depends"),
+ description=_("Same as builddepends, but the list is of "
+ "arch-dependent packages"),
+ required=False)
build_conflicts = TextLine(
title=_("DSC build conflicts"),
description=_("Binaries that will conflict when building this "
@@ -64,6 +69,11 @@
description=_("Same as build-conflicts but only lists "
"arch-independent binaries."),
required=False)
+ build_conflicts_arch = TextLine(
+ title=_("DSC arch-dependent build conflicts"),
+ description=_("Same as build-conflicts but only lists "
+ "arch-dependent binaries."),
+ required=False)
architecturehintlist = TextLine(
title=_("Architecture Hint List"),
description=_(
=== modified file 'lib/lp/soyuz/model/sourcepackagerelease.py'
--- lib/lp/soyuz/model/sourcepackagerelease.py 2015-11-20 17:57:46 +0000
+++ lib/lp/soyuz/model/sourcepackagerelease.py 2016-01-12 17:05:26 +0000
@@ -99,8 +99,10 @@
changelog_entry = StringCol(dbName='changelog_entry')
builddepends = StringCol(dbName='builddepends')
builddependsindep = StringCol(dbName='builddependsindep')
+ builddependsarch = StringCol(dbName='builddependsarch')
build_conflicts = StringCol(dbName='build_conflicts')
build_conflicts_indep = StringCol(dbName='build_conflicts_indep')
+ build_conflicts_arch = StringCol(dbName='build_conflicts_arch')
architecturehintlist = StringCol(dbName='architecturehintlist')
homepage = StringCol(dbName='homepage')
format = EnumCol(dbName='format', schema=SourcePackageType,
=== modified file 'lib/lp/soyuz/scripts/gina/handlers.py'
--- lib/lp/soyuz/scripts/gina/handlers.py 2015-05-20 11:31:11 +0000
+++ lib/lp/soyuz/scripts/gina/handlers.py 2016-01-12 17:05:26 +0000
@@ -624,8 +624,10 @@
changelog_entry=src.changelog_entry,
builddepends=src.build_depends,
builddependsindep=src.build_depends_indep,
+ builddependsarch=src.build_depends_arch,
build_conflicts=src.build_conflicts,
build_conflicts_indep=src.build_conflicts_indep,
+ build_conflicts_arch=src.build_conflicts_arch,
architecturehintlist=src.architecture,
format=SourcePackageType.DPKG,
upload_distroseries=distroseries.id,
=== modified file 'lib/lp/soyuz/scripts/gina/packages.py'
--- lib/lp/soyuz/scripts/gina/packages.py 2015-12-07 21:49:16 +0000
+++ lib/lp/soyuz/scripts/gina/packages.py 2016-01-12 17:05:26 +0000
@@ -277,8 +277,10 @@
# Defaults, potentially overwritten by __init__
build_depends = ""
build_depends_indep = ""
+ build_depends_arch = ""
build_conflicts = ""
build_conflicts_indep = ""
+ build_conflicts_arch = ""
standards_version = ""
section = None
format = None
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt 2015-11-30 04:18:39 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt 2016-01-12 17:05:26 +0000
@@ -118,12 +118,12 @@
... 'http://launchpad.dev/ubuntu/breezy-autotest/+source/'
... 'commercialpackage')
-PackageRelationships, 'builddepends', 'builddependsindep',
-'build_conflicts' and 'build_conflicts_indep' for the source in
-question are provided in this page.
+PackageRelationships, 'builddepends', 'builddependsindep', 'builddependsarch',
+'build_conflicts', 'build_conflicts_indep', and 'build_conflicts_arch' for the
+source in question are provided in this page.
-Even when the relationshipt section is empty they are presented,
-keeping the page format contant.
+Even when the relationship section is empty they are presented,
+keeping the page format constant.
>>> depends_section = find_tag_by_id(browser.contents, 'depends')
>>> parse_relationship_section(str(depends_section))
@@ -133,6 +133,10 @@
>>> parse_relationship_section(str(dependsindep_section))
EMPTY SECTION
+ >>> dependsarch_section = find_tag_by_id(browser.contents, 'dependsarch')
+ >>> parse_relationship_section(str(dependsarch_section))
+ EMPTY SECTION
+
>>> conflicts_section = find_tag_by_id(browser.contents, 'conflicts')
>>> parse_relationship_section(str(conflicts_section))
EMPTY SECTION
@@ -142,6 +146,11 @@
>>> parse_relationship_section(str(conflictsindep_section))
EMPTY SECTION
+ >>> conflictsarch_section = find_tag_by_id(
+ ... browser.contents, 'conflictsarch')
+ >>> parse_relationship_section(str(conflictsarch_section))
+ EMPTY SECTION
+
Let's inspect a page with non-empty relationships.
>>> browser.open(
@@ -163,6 +172,10 @@
LINK: "pmount" -> http://launchpad.dev/ubuntu/warty/+package/pmount
TEXT: "postgresql-client (>= 7.4)"
+ >>> dependsarch_section = find_tag_by_id(browser.contents, 'dependsarch')
+ >>> parse_relationship_section(str(dependsarch_section))
+ EMPTY SECTION
+
>>> conflicts_section = find_tag_by_id(browser.contents, 'conflicts')
>>> parse_relationship_section(str(conflicts_section))
TEXT: "gcc-4.0"
@@ -174,6 +187,11 @@
TEXT: "gcc-4.0-base"
LINK: "pmount" -> http://launchpad.dev/ubuntu/warty/+package/pmount
+ >>> conflictsarch_section = find_tag_by_id(
+ ... browser.contents, 'conflictsarch')
+ >>> parse_relationship_section(str(conflictsarch_section))
+ EMPTY SECTION
+
The '+changelog' page provides an aggregation of the changelogs for
SourcePackageReleases published in this DistroSeries.
=== modified file 'lib/lp/soyuz/tests/test_publishing.py'
--- lib/lp/soyuz/tests/test_publishing.py 2015-10-05 22:21:17 +0000
+++ lib/lp/soyuz/tests/test_publishing.py 2016-01-12 17:05:26 +0000
@@ -191,10 +191,11 @@
urgency=SourcePackageUrgency.LOW,
scheduleddeletiondate=None, dateremoved=None,
distroseries=None, archive=None, builddepends=None,
- builddependsindep=None, architecturehintlist='all',
+ builddependsindep=None, builddependsarch=None,
+ architecturehintlist='all',
dsc_standards_version='3.6.2', dsc_format='1.0',
dsc_binaries='foo-bin', build_conflicts=None,
- build_conflicts_indep=None,
+ build_conflicts_indep=None, build_conflicts_arch=None,
dsc_maintainer_rfc822='Foo Bar <foo@xxxxxxx>',
maintainer=None, creator=None, date_uploaded=UTC_NOW,
spr_only=False, user_defined_fields=None):
@@ -231,8 +232,10 @@
version=version,
builddepends=builddepends,
builddependsindep=builddependsindep,
+ builddependsarch=builddependsarch,
build_conflicts=build_conflicts,
build_conflicts_indep=build_conflicts_indep,
+ build_conflicts_arch=build_conflicts_arch,
architecturehintlist=architecturehintlist,
changelog=None,
changelog_entry=None,
=== modified file 'lib/lp/testing/factory.py'
--- lib/lp/testing/factory.py 2016-01-11 21:11:27 +0000
+++ lib/lp/testing/factory.py 2016-01-12 17:05:26 +0000
@@ -3575,9 +3575,10 @@
creator=None, component=None,
section_name=None, urgency=None,
version=None, builddepends=None,
- builddependsindep=None,
+ builddependsindep=None, builddependsarch=None,
build_conflicts=None,
build_conflicts_indep=None,
+ build_conflicts_arch=None,
architecturehintlist='all',
dsc_maintainer_rfc822=None,
dsc_standards_version='3.6.2',
@@ -3643,8 +3644,10 @@
version=version,
builddepends=builddepends,
builddependsindep=builddependsindep,
+ builddependsarch=builddependsarch,
build_conflicts=build_conflicts,
build_conflicts_indep=build_conflicts_indep,
+ build_conflicts_arch=build_conflicts_arch,
architecturehintlist=architecturehintlist,
changelog=changelog,
changelog_entry=changelog_entry,
Follow ups