Your message dated Fri, 07 Oct 2016 09:43:53 +0200 with message-id <[email protected]> and subject line Re: Add tag support for debhelper files has caused the Debian Bug report #498383, regarding Add tag support for debhelper files 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.) -- 498383: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=498383 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: debhelper Version: 8.0.0~mrvn.1 Severity: wishlist Tags: patch Hi, during the recent emDebian work session in Extremadura we talked about how to reduce the amount of patching emDebian has to do on debhelper files due to using special DEB_BUILD_OPTIONS (specifically nodoc). The problem is that depending on DEB_BUILD_OPTIONS the amount of files debhelper should act upon varies. The solution we came up with is to tag lines and let debhelper match those tags against DEB_BUILD_OPTIONS and some DEB_HOST_*. That way lines can be made conditional. The syntax is fairly simple. Tags are single words that can be prefixed by ! to negate the match. A list of tags is tags seperated by space. A line can be tagged by prefixing it with a list of tags enclosed in []: [tag1 !tag2 tag3] source [<dest>] A list of tags matches if all tags are present in DEB_BUILD_OPTIONS (or not for !) and then the source [<dest>] pair is used. Otherwise the line is ignored. Lines without tag are always used. Using the tags the same debhelper files can be used for normal builds and builds with DEB_BUILD_OPTIONS=nodoc once the respective doc files have been tagged [!nodoc]. MfG Goswin -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (400, 'unstable-i386') Architecture: amd64 (x86_64) Kernel: Linux 2.6.25-kvm-nofb (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/bash Versions of packages debhelper depends on: ii binutils 2.18.1~cvs20080103-7 The GNU assembler, linker and bina ii dpkg-dev 1.14.24 Debian package development tools ii file 4.26-1 Determines file type using "magic" ii html2text 1.3.2a-5 advanced HTML to text converter ii man-db 2.5.2-3 on-line manual pager ii perl 5.10.0-13 Larry Wall's Practical Extraction ii po-debconf 1.0.15 manage translated Debconf template debhelper recommends no packages. Versions of packages debhelper suggests: ii dh-make 0.46 tool that converts source archives -- no debconf informationdiff -Nru debhelper-7.0.17/Debian/Debhelper/Dh_Lib.pm debhelper-8.0.0~mrvn.1/Debian/Debhelper/Dh_Lib.pm --- debhelper-7.0.17/Debian/Debhelper/Dh_Lib.pm 2008-05-01 00:13:06.000000000 +0200 +++ debhelper-8.0.0~mrvn.1/Debian/Debhelper/Dh_Lib.pm 2008-09-06 18:23:51.000000000 +0200 @@ -17,7 +17,7 @@ &is_udeb &udeb_filename &debhelper_script_subst &escape_shell &inhibit_log); -my $max_compat=7; +my $max_compat=8; sub init { # If DH_OPTIONS is set, prepend it @ARGV. @@ -538,6 +538,11 @@ my $globdir=shift; my @ret; + my $tags = `dpkg-architecture -qDEB_HOST_ARCH`; + $tags = $tags . `dpkg-architecture -qDEB_HOST_ARCH_OS`; + $tags = $tags . `dpkg-architecture -qDEB_HOST_GNU_SYSTEM`; + $tags = $tags . `dpkg-architecture -qDEB_HOST_GNU_TYPE`; + $tags = $tags . $ENV{DEB_BUILD_OPTIONS} if ($ENV{DEB_BUILD_OPTIONS}); open (DH_FARRAY_IN, $file) || error("cannot read $file: $1"); while (<DH_FARRAY_IN>) { chomp; @@ -546,6 +551,30 @@ next if /^#/ || /^$/; } my @line; + my $input; + # Only do DEB_BUILD_OPTIONS checking in v8 mode. + if (! compat(7) && /^\[/) { + my $remaining; + ($remaining) = m/^\[[^\]]*\]\s+(.*)/; + ($_) = m/^\[([^\]]*)\]/im; + my $res = 0; + for (split) { + if (/^!/) { + ($_) = m/^!(.*)/im; + if ($tags =~ /\b$_\b/) { + $res = 1; + last; + } + } else { + if (!($tags =~ /\b$_\b/)) { + $res = 1; + last; + } + } + } + next if $res; + $_ = $remaining; + } # Only do glob expansion in v3 mode. # # The tricky bit is that the glob expansion is done diff -Nru debhelper-7.0.17/debian/changelog debhelper-8.0.0~mrvn.1/debian/changelog --- debhelper-7.0.17/debian/changelog 2008-08-23 04:30:21.000000000 +0200 +++ debhelper-8.0.0~mrvn.1/debian/changelog 2008-09-06 18:20:33.000000000 +0200 @@ -1,3 +1,10 @@ +debhelper (8.0.0~mrvn.1) unstable; urgency=low + + * Introduce DEB_BUILD_OPTION and architecture specific tags for + package.* files to conditionally install files. + + -- Goswin von Brederlow <[email protected]> Sat, 06 Sep 2008 10:12:13 +0200 + debhelper (7.0.17) unstable; urgency=low [ Per Olofsson ]
--- End Message ---
--- Begin Message ---Hi! At a glance, the very same problem could be tackled with build profiles, which are already supported by dh-exec (and other tools, too). The BuildProfiles spec explicitly points out nodoc as a case for a profile. As such, I'm closing this bug, but if I'm mistaken, and build profiles are not enough, let me know, and we'll work something out. -- |8]
--- End Message ---

