Package: libconfig-model-dpkg-perl Version: 2.056 Severity: wishlist Tags: patch
Dear libconfig-model-dpkg-perl maintainers, the syntax for the Build-Profiles field was changed during the bootstrap sprint in paris [1,2]. I wanted to file my patch for libconfig-model-dpkg-perl once dpkg with the new syntax was released but since that release did not happen during the past month and at the same time the freeze draws dangerously close, I decided to file this bug with the patch anyways. Please note that this patch is untested as I have no clue about libconfig-model-dpkg-perl or the grammar it uses. So I based the attached patch on commit 373cb3d0 which implemented initial build profile support. In contrast to apt, it is (as far as I know) not necessary that libconfig-model-dpkg-perl in Jessie understands the syntax though. Only the tools which are directly invoked by the buildd machinery must be able to understand build profiles. Nevertheless, in case you do another release before the freeze, consider the attached patch. Maybe you want to wait until dpkg implements the new syntax for better testing [3]. Otherwise, maybe you should remove the existing support for the old build profile syntax because it is not compatible with what will end up in dpkg and apt in Jessie. Thanks a lot and sorry for the confusion and late submission. cheers, josch [1] https://wiki.debian.org/Sprints/2014/BootstrapSprint [2] https://wiki.debian.org/BuildProfileSpec [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760158
>From 4bdf4513b45632f23ab4e0154d2841ae4934cb25 Mon Sep 17 00:00:00 2001 From: josch <[email protected]> Date: Thu, 2 Oct 2014 17:29:32 +0200 Subject: [PATCH] new build profiles syntax --- lib/Config/Model/Dpkg/Dependency.pm | 4 ++-- lib/Config/Model/models/Dpkg/Control/Binary.pl | 4 ++-- t/model_tests.d/dpkg-control-examples/build-profiles | 6 +++--- t/model_tests.d/dpkg-control-test-conf.pl | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Config/Model/Dpkg/Dependency.pm b/lib/Config/Model/Dpkg/Dependency.pm index 486e8e6..1a03042 100644 --- a/lib/Config/Model/Dpkg/Dependency.pm +++ b/lib/Config/Model/Dpkg/Dependency.pm @@ -169,7 +169,7 @@ depend: pkg_dep | variable # For the allowed stuff after ${foo}, see #702792 variable: /\${[\w:\-]+}[\w\.\-~+]*/ -pkg_dep: pkg_name dep_version(?) arch_restriction(?) profile_restriction(?) { +pkg_dep: pkg_name dep_version(?) arch_restriction(?) profile_restriction(s) { my $dv = $item[2] ; my $ar = $item[3] ; my @ret = ( $item{pkg_name} ) ; @@ -181,7 +181,7 @@ pkg_dep: pkg_name dep_version(?) arch_restriction(?) profile_restriction(?) { profile_restriction: '<' profile(s) '>' -profile: not(?) 'profile.' profile_name +profile: not(?) profile_name profile_name: /[a-z][a-z0-9-]*/ diff --git a/lib/Config/Model/models/Dpkg/Control/Binary.pl b/lib/Config/Model/models/Dpkg/Control/Binary.pl index a499551..907a777 100644 --- a/lib/Config/Model/models/Dpkg/Control/Binary.pl +++ b/lib/Config/Model/models/Dpkg/Control/Binary.pl @@ -304,8 +304,8 @@ supported by the library', }, 'Build-Profiles', { - 'description' => 'A space-separated list of optionally negated profile names', - 'match' => '[!]?[a-z][a-z0-9-]*(\\s+[!]?[a-z][a-z0-9-]*)*', + 'description' => 'A list of lists of (optionally negated) profile names, forming a conjunctive normal form expression in the same syntax as in the Build-Depends field', + 'match' => '<!?[a-z0-9]+(?:\s+!?[a-z0-9]+)*>(?:\s+<!?[a-z0-9]+(?:\s+!?[a-z0-9]+)*>)*', 'type' => 'leaf', 'value_type' => 'uniline' } diff --git a/t/model_tests.d/dpkg-control-examples/build-profiles b/t/model_tests.d/dpkg-control-examples/build-profiles index 1b43b5d..897ffaa 100644 --- a/t/model_tests.d/dpkg-control-examples/build-profiles +++ b/t/model_tests.d/dpkg-control-examples/build-profiles @@ -3,13 +3,13 @@ Section: devel Priority: optional Maintainer: Tollef Fog Heen <[email protected]> Build-Depends: debhelper (>= 9.20140227), dpkg-dev (>= 1.17.2), dh-autoreconf, - libglib2.0-dev <!profile.stage1> + libglib2.0-dev <!stage1> Homepage: http://pkg-config.freedesktop.org Standards-Version: 3.8.4 Package: pkg-config Architecture: any -Build-Profiles: !stage1 +Build-Profiles: <!stage1> Multi-Arch: foreign Depends: ${shlibs:Depends}, ${misc:Depends} Description: manage compile and link flags for libraries @@ -22,7 +22,7 @@ Description: manage compile and link flags for libraries Package: pkg-config-stage1 Architecture: any -Build-Profiles: stage1 +Build-Profiles: <stage1> Multi-Arch: foreign Depends: ${shlibs:Depends}, ${misc:Depends} Provides: pkg-config diff --git a/t/model_tests.d/dpkg-control-test-conf.pl b/t/model_tests.d/dpkg-control-test-conf.pl index 6664ec6..1918968 100644 --- a/t/model_tests.d/dpkg-control-test-conf.pl +++ b/t/model_tests.d/dpkg-control-test-conf.pl @@ -184,8 +184,8 @@ providing the following file: name => 'build-profiles', load_warnings => [ qr/standards version/ ], check => { - 'binary:pkg-config Build-Profiles' => '!stage1', - 'binary:pkg-config-stage1 Build-Profiles' => 'stage1', + 'binary:pkg-config Build-Profiles' => '<!stage1>', + 'binary:pkg-config-stage1 Build-Profiles' => '<stage1>', }, } ); -- 2.0.1

