Hi dpkg people, :)

since build profiles have successfully been introduced in dpkg 1.17.2, it was
very easy to also convince others like apt and debhelper to support them. In
this email I want to discuss an addendum to what is implemented in dpkg right
now.

The problem is, that tools which analyze dependency relationships between
binary and source packages (like dose3), currently use only Packages and
Sources files as input. While the <!profile.stage1> bits of the Build-Depends
field is properly propagated into the Sources file, the information which
binary packages do or do not build with one or more profiles activated (the
content of the Build-Profiles field in the binary package stanzas in
debian/control) is currently not included in either the Packages or the Sources
file.  Therefore, currently, a tool like dose3 would have to have access to the
debian/control files of all relevant (since there is no way to know beforehand,
this would probably mean *all*) source packages to get this information.

There were also some remaining warnings of dpkg-source, dpkg-gencontrol and
dpkg-genchanges when building source packages with binary package stanzas that
included the Build-Profiles field. The following patch fixes these as well as
the above issue:

--%<---------------------------------------------------------------------------
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index 2871234..dbd0631 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -334,6 +334,7 @@ check_conffiles(const char *dir)
 
 static const char *arbitrary_fields[] = {
   "Built-For-Profiles",
+  "Build-Profiles",
   "Built-Using",
   "Package-Type",
   "Subarchitecture",
diff --git a/scripts/Dpkg/Control/FieldsCore.pm 
b/scripts/Dpkg/Control/FieldsCore.pm
index 5687165..428a593 100644
--- a/scripts/Dpkg/Control/FieldsCore.pm
+++ b/scripts/Dpkg/Control/FieldsCore.pm
@@ -115,6 +115,10 @@ our %FIELDS = (
         allowed => ALL_PKG | CTRL_FILE_CHANGES,
         separator => FIELD_SEP_SPACE,
     },
+    'Build-Profiles' => {
+        allowed => ALL_PKG,
+        separator => FIELD_SEP_SPACE,
+    },
     'Built-Using' => {
         allowed => ALL_PKG,
         separator => FIELD_SEP_COMMA,
-->%---------------------------------------------------------------------------

The question is: is it okay to have the Build-Profiles field be part of the
resulting *.deb files?

In IRC, Raphaƫl Hertzog pointed out that the information whether a binary
package does or does not build with a certain profile activated is a property
of the source package and should thus be encoded in the Sources file somehow.
He suggested that this could be done encoding this information in the
Package-List field in the .dsc file.

What do you think is the right way of encoding the information of the
Build-Profiles field in the debian/control binary package stanza in the
Packages and Sources files in an archive?

cheers, josch


--
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20140221113013.18244.3579@hoothoot

Reply via email to