Your message dated Wed, 07 Sep 2016 16:25:04 +0000
with message-id <[email protected]>
and subject line Bug#772788: fixed in cdbs 0.4.146
has caused the Debian Bug report #772788,
regarding cdbs: please support build profiles
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
772788: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772788
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cdbs
Version: 0.4.127
Severity: normal
Tags: patch

Hi,

the build profile spec [1] allows packages to be selectively built
depending on which profiles are activated through the DEB_BUILD_PROFILES
environment variable and the Build-Profiles field in the binary package
stanza.

The attached patch is an attempt to carry over the necessary changes
from debhelper into cdbs.

Thanks!

cheers, josch

[1] https://wiki.debian.org/BuildProfileSpec
diff --git a/scripts/list-packages b/scripts/list-packages
index f6641f5..926fddc 100755
--- a/scripts/list-packages
+++ b/scripts/list-packages
@@ -49,6 +49,11 @@ sub GetPackages {
 	my $arch="";
 	my @list=();
 	my %seen;
+	my @profiles=();
+	my $included_in_build_profile;
+	if (exists $ENV{'DEB_BUILD_PROFILES'}) {
+		@profiles=split /\s+/, $ENV{'DEB_BUILD_PROFILES'};
+	}
 	open (CONTROL, 'debian/control') ||
 		error("cannot read debian/control: $!\n");
 	while (<CONTROL>) {
@@ -63,13 +68,30 @@ sub GetPackages {
 			else {
 				error("debian/control has a duplicate entry for $package");
 			}
+			$included_in_build_profile=1;
 		}
 		if (/^Architecture:\s*(.*)/) {
 			$arch=$1;
 		}
+		# rely on libdpkg-perl providing the parsing functions because
+		# if we work on a package with a Build-Profiles field, then a
+		# high enough version of dpkg-dev is needed anyways
+		if (/^Build-Profiles:\s*(.*)/) {
+				my $build_profiles=$1;
+			eval {
+				require Dpkg::BuildProfiles;
+				my @restrictions=Dpkg::BuildProfiles::parse_build_profiles($build_profiles);
+				if (@restrictions) {
+					$included_in_build_profile=Dpkg::BuildProfiles::evaluate_restriction_formula(\@restrictions, \@profiles);
+				}
+			};
+			if ($@) {
+				error("The control file has a Build-Profiles field. Requires libdpkg-perl >= 1.17.14");
+			}
+		}
 	
 		if (!$_ or eof) { # end of stanza.
-			if ($package &&
+			if ($package && $included_in_build_profile &&
 #			    (($type eq 'indep' && $arch eq 'all') ||
 #			     ($type eq 'arch' && $arch ne 'all') ||
 #			     ($type eq 'same' && (samearch(buildarch(), $arch))) ||

--- End Message ---
--- Begin Message ---
Source: cdbs
Source-Version: 0.4.146

We believe that the bug you reported is fixed in the latest version of
cdbs, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jonas Smedegaard <[email protected]> (supplier of updated cdbs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 07 Sep 2016 17:45:19 +0200
Source: cdbs
Binary: cdbs
Architecture: source all
Version: 0.4.146
Distribution: unstable
Urgency: medium
Maintainer: CDBS Hackers <[email protected]>
Changed-By: Jonas Smedegaard <[email protected]>
Description:
 cdbs       - common build system for Debian packages
Closes: 772788
Changes:
 cdbs (0.4.146) unstable; urgency=medium
 .
   * Support build profiles.
     Closes: Bug#772788. Thanks to Johannes Schauer.
Checksums-Sha1:
 e180408b52cce10c5ec7fe7902c9b1563329ee1c 1846 cdbs_0.4.146.dsc
 b10e0f1ff10082d63c876f96c41ef8791c1f2464 204528 cdbs_0.4.146.tar.xz
 d0f04450179eefb13de3da5490033f4f388d285a 82196 cdbs_0.4.146_all.deb
Checksums-Sha256:
 f3bbbdea16aed1861fa34b64c2c0e13586572104b522cdc9ccbcd8e7b003c9da 1846 
cdbs_0.4.146.dsc
 b7f4aff9d0674c19521012529c959621b48bbad371a824940490f9566962b3fd 204528 
cdbs_0.4.146.tar.xz
 dd1dbb65e55f9847098d131c00c5cb01fa4ae67462b8d32f586f35543daacac0 82196 
cdbs_0.4.146_all.deb
Files:
 36161f94aaa10130e2483817755af22c 1846 devel optional cdbs_0.4.146.dsc
 84fe5250dd1b846d04f5ca7a4fd7ee09 204528 devel optional cdbs_0.4.146.tar.xz
 4cb68d7ac90ea93c60f2530aba349c7a 82196 devel optional cdbs_0.4.146_all.deb

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJX0DnmAAoJECx8MUbBoAEhES8P/2yF4GceMc7bCwYZeMl9Xuio
8K6w1gh72weLGgnmkhxd0Z6zLCi1fK9vtkwUCib+bWHCbiVz3dKHiNmOZgMJYweW
g6C4m/dbE5lG9J1J2xNZhyAKbt/9G9lx+tIdduQRxEgvKBahPGC3t4UMXuPhL+vV
6TjPKPm7VLpwLDWv7Q+0CBkYooOOvIWeFUirBQbdjudK3uA3FxjEYiJuuSN8V99p
e7O3ACVDj4IOJ5IQDciyJ6sMHzZRveRpLhrDF/4xS2payRhvr8s9iBmU9NxoB1li
H1S6EUQ5aezkaVZTbd3mCdA5tdpYellFYQusFHePBxb2FCBAsnJnvBocL64HsEYs
ZLQThvIeEnh2digGaJ2rlr7KrZwLy74K98S08gsFptatxdj/HQGvzyf5Agx1TjSn
hGEZ+Tdz0GZl7k6h7tlWkHZqi1gFHAydHeh0MntEWX+bfGkBypugA5qRTp2rAZLI
vl6MFfdXtpmEw2t4/axMbQdFNzPzAtOKVisieMr0C4IsLBUm1u7gqwN79LKzNOrh
iqSdcxL/cVPTwHHfGMXNHP1T/kHR7FQ85ay/khwZs/AbgtUWi2Jbs5vENQtp+vf4
hpkKKhEp9TxEGqoTUt8cHzrprYVc+AZVj0SqsI1lKtzb+mpFLaRR/89PMCYhzdJ0
juLp/kP9R3HnxQ1sNc7m
=q76Y
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to