Merge lp:~roadmr/checkbox/ppppcc-glmark2-es2 into lp:~checkbox-dev/checkbox/ppa-packaging-plainbox-provider-canonical-certification

Proposed by Daniel Manrique
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 31
Merged at revision: 31
Proposed branch: lp:~roadmr/checkbox/ppppcc-glmark2-es2
Merge into: lp:~checkbox-dev/checkbox/ppa-packaging-plainbox-provider-canonical-certification
Diff against target: 40 lines (+13/-3)
1 file modified
debian/control (+13/-3)
To merge this branch: bzr merge lp:~roadmr/checkbox/ppppcc-glmark2-es2
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+231788@code.launchpad.net

Commit message

Depend/install glmark2-es2 via an architecture-specific metapackage.

The architecture-specific restriction only applies to arch-specific packages,
while plainbox-provider-certification-client is Architecture: all. In order to
avoid making it Architecture: any, it was made to recommend a metapackage.

The tiny metapackage *is* arch-specific and itself depends selectively on
glmark2-es2; so on the designated architectures the metapackage will install
glmark2-es2, while on the other architectures it will have no dependencies
and just be installed by itself.

I also snuck in a couple minor debian/control syntax fixes.

Description of the change

OOps... the previous merge failed because an arch: all package can't have arch-specific dependencies. See the build log:

dpkg-gencontrol: error: the Recommends field contains an arch-specific dependency but the package is architecture all

https://launchpadlibrarian.net/182893179/buildlog_ubuntu-trusty-i386.plainbox-provider-canonical-certification_0.6%2Bbzr3209%2Bpkg29~ubuntu14.04.1_FAILEDTOBUILD.txt.gz

The fix I'm proposing is to depend/install glmark2-es2 via an architecture-specific metapackage.

The architecture-specific restriction only applies to arch-specific packages,
while plainbox-provider-certification-client is Architecture: all. In order to
avoid making it Architecture: any, it was made to recommend a metapackage.

The tiny metapackage *is* arch-specific and itself depends selectively on
glmark2-es2; so on the designated architectures the metapackage will install
glmark2-es2, while on the other architectures it will have no dependencies
and just be installed by itself.

I also snuck in a couple minor debian/control syntax fixes.

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

I tested that this builds correctly, and it does. On my test system, it spit out an amd64-specific package for the metapackage:

 Package: plainbox-glmark2-es2-meta
 Source: plainbox-provider-canonical-certification
 Version: 0.6
 Architecture: amd64
 Maintainer: Ubuntu Developers <email address hidden>
 Installed-Size: 27
 Section: utils
 Priority: optional

Here you can see it doesn't depend on anything, so it will not try to pull glmark2-es2 on amd64.

I can't do an arm* build, but I imagine it'd have a Depends: field in that case.

And this is why an arch:all package can't have this restriction: the way the arch-specific dependency works is by "mangling" the control data accordingly to account for the selective dependency. This is explained in detail here: https://www.debian.org/doc/debian-policy/ch-relationships.html (maybe I could have avoided the earlier build problem if I'd read this carefully).

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

+1 great fix

As mentioned I'd like to get some feedback from mvo about how this works and if that's something he wants to change in apt later on but it in the meantime let's merge it in

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-08-21 15:08:01 +0000
3+++ debian/control 2014-08-21 18:57:59 +0000
4@@ -29,16 +29,16 @@
5
6 Package: plainbox-provider-certification-client
7 Architecture: all
8-Depends: checkbox-ng-service (>0.4~dev),
9+Depends: checkbox-ng-service (>>0.4~dev),
10 plainbox-provider-checkbox (>=0.5~dev),
11- plainbox-provider-resource-generic (>0.4~dev),
12+ plainbox-provider-resource-generic (>>0.4~dev),
13 python3-plainbox (>=0.6~dev)
14 Recommends: bootchart,
15 ethtool,
16 fswebcam,
17 fwts (>=14.03.00-0ubuntu1~),
18 glmark2,
19- glmark2-es2 [arm64 armhf],
20+ plainbox-glmark2-es2-meta,
21 gtkperf,
22 hdparm,
23 imagemagick,
24@@ -55,6 +55,16 @@
25 Description: Client Certification
26 This package provides the Client Certification whitelists.
27
28+Package: plainbox-glmark2-es2-meta
29+Architecture: any
30+Depends: glmark2-es2 [arm64 armhf]
31+Description: metapackage to selectively install glmark2-es2
32+ The objective of this metapackage is not introducing architecture
33+ specificity in plainbox-provider-certification-client. This metapackage
34+ will cause installation of glmark2-es2 on arm architectures, while just
35+ being a dummy package on others. Arch-independent packages can depend
36+ on this one to (maybe) install glmark2-es2.
37+
38 Package: plainbox-provider-certification-server
39 Architecture: all
40 Depends: plainbox-provider-checkbox

Subscribers

People subscribed via source and target branches