[libconfig-model-dpkg-perl] 04/06: Control Binary model: added Build-Profiles (Tx Peter Pentchev)

dod at debian.org dod at debian.org
Fri Jul 18 19:25:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.

commit 373cb3d014288ea73efccb96ff7f9c37f738538c
Author: Dominique Dumont <dod at debian.org>
Date:   Fri Jul 18 21:22:35 2014 +0200

    Control Binary model: added Build-Profiles (Tx Peter Pentchev)
---
 lib/Config/Model/Dpkg/Dependency.pm                |  8 ++++-
 lib/Config/Model/models/Dpkg/Control/Binary.pl     |  7 ++++
 .../dpkg-control-examples/build-profiles           | 37 ++++++++++++++++++++++
 t/model_tests.d/dpkg-control-test-conf.pl          |  8 +++++
 4 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/lib/Config/Model/Dpkg/Dependency.pm b/lib/Config/Model/Dpkg/Dependency.pm
index 51f6739..a8c4add 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(?) {
+pkg_dep: pkg_name dep_version(?) arch_restriction(?) profile_restriction(?) {
     my $dv = $item[2] ;
     my $ar = $item[3] ;
     my @ret = ( $item{pkg_name} ) ;
@@ -179,6 +179,12 @@ pkg_dep: pkg_name dep_version(?) arch_restriction(?) {
     $return = \@ret ; ;
    }
 
+profile_restriction: '<' profile(s) '>'
+
+profile: not(?) 'profile.' profile_name
+
+profile_name: /[a-z][a-z0-9-]*/
+
 arch_restriction: '[' osarch(s) ']'
     {
         my $mismatch = 0;
diff --git a/lib/Config/Model/models/Dpkg/Control/Binary.pl b/lib/Config/Model/models/Dpkg/Control/Binary.pl
index aced01a..a499551 100644
--- a/lib/Config/Model/models/Dpkg/Control/Binary.pl
+++ b/lib/Config/Model/models/Dpkg/Control/Binary.pl
@@ -301,6 +301,13 @@ 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-]*)*',
+        'type' => 'leaf',
+        'value_type' => 'uniline'
       }
     ],
     'license' => 'LGPL2',
diff --git a/t/model_tests.d/dpkg-control-examples/build-profiles b/t/model_tests.d/dpkg-control-examples/build-profiles
new file mode 100644
index 0000000..1b43b5d
--- /dev/null
+++ b/t/model_tests.d/dpkg-control-examples/build-profiles
@@ -0,0 +1,37 @@
+Source: pkg-config
+Section: devel
+Priority: optional
+Maintainer: Tollef Fog Heen <tfheen at debian.org>
+Build-Depends: debhelper (>= 9.20140227), dpkg-dev (>= 1.17.2), dh-autoreconf,
+ libglib2.0-dev <!profile.stage1>
+Homepage: http://pkg-config.freedesktop.org
+Standards-Version: 3.8.4
+
+Package: pkg-config
+Architecture: any
+Build-Profiles: !stage1
+Multi-Arch: foreign
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: manage compile and link flags for libraries
+ pkg-config is a system for managing library compile and link flags that 
+ works with automake and autoconf.
+ .
+ Increasingly libraries ship with ".pc" files that allow querying of the
+ compiler and linker flags needed to use them through the pkg-config(1)
+ program.
+
+Package: pkg-config-stage1
+Architecture: any
+Build-Profiles: stage1
+Multi-Arch: foreign
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Provides: pkg-config
+Description: manage compile and link flags for libraries (bootstrap)
+ pkg-config is a system for managing library compile and link flags that 
+ works with automake and autoconf.
+ .
+ Increasingly libraries ship with ".pc" files that allow querying of the
+ compiler and linker flags needed to use them through the pkg-config(1)
+ program.
+ .
+ This is an intermediate package to be used for bootstrap builds.
diff --git a/t/model_tests.d/dpkg-control-test-conf.pl b/t/model_tests.d/dpkg-control-test-conf.pl
index 6f5f519..3e54054 100644
--- a/t/model_tests.d/dpkg-control-test-conf.pl
+++ b/t/model_tests.d/dpkg-control-test-conf.pl
@@ -177,6 +177,14 @@ providing the following file:
             'source Section' => 'gnu-r',
             'binary:gnu-r-view Section' => 'gnu-r',
         ]
+    },
+    {
+        name => 'build-profiles',
+        load_warnings => [ qr/standards version/ ],
+        check => {
+            'binary:pkg-config Build-Profiles' => '!stage1',
+            'binary:pkg-config-stage1 Build-Profiles' => 'stage1',
+        },
     }
 );
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git



More information about the Pkg-perl-cvs-commits mailing list