Debian Bug report logs - #642129
debhelper: Please allow brace expansion in debhelper config files

version graph

Package: debhelper; Maintainer for debhelper is Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>; Source for debhelper is src:debhelper.

Reported by: Guillem Jover <guillem@debian.org>

Date: Mon, 19 Sep 2011 17:33:52 UTC

Severity: wishlist

Found in version debhelper/8.9.7

Fixed in version debhelper/8.9.12

Done: Joey Hess <joeyh@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, hertzog@debian.org, Joey Hess <joeyh@debian.org>:
Bug#642129; Package debhelper. (Mon, 19 Sep 2011 17:33:58 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
New Bug report received and forwarded. Copy sent to hertzog@debian.org, Joey Hess <joeyh@debian.org>. (Mon, 19 Sep 2011 17:33:58 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: submit@bugs.debian.org
Subject: debhelper: Please allow brace expansion in debhelper config files
Date: Mon, 19 Sep 2011 19:31:47 +0200
Package: debhelper
Version: 8.9.7
Severity: wishlist

Hi!

Due to a bug in lintian the brace-expansion-in-debhelper-config-file
warning (introduced in 2.1.4) did not trigger until lintian 2.5.2,
which made it difficult to realize there was a problem with it at
all until recently.

dpkg started using brace expansion [0] due to a change in debhelper
4.9.5 which made wildcards expanding to nothing to error out.

I don't know what made Raphaël think that was supported, maybe just
trial and error, but it seems like a rather elegant “solution”. In any
case I don't want to justify the fact that dpkg is using undocumented
behaviour (I'm aware of #480868 and #480939) and that debhelper
should support it because packages are using it. Just wanted to request
if this could become a sanctioned behaviour because it truly seems
useful and elegant. In case you still don't want to support it, could
you consider instead to add an option to not fail on wildcards expanding
to nothing, so that we can revert to our old debhelper config files,
w/o needing to move most of the install files to debian/rules?

thanks,
guillem

[0] <http://anonscm.debian.org/gitweb/?p=dpkg/dpkg.git;a=commitdiff;h=7b4bb2d5fd82854887e5853dae1aeddd28cd98fe>




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#642129; Package debhelper. (Mon, 19 Sep 2011 18:37:23 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. (Mon, 19 Sep 2011 18:37:23 GMT) Full text and rfc822 format available.

Message #10 received at submit@bugs.debian.org (full text, mbox):

From: Joey Hess <joeyh@debian.org>
To: Guillem Jover <guillem@debian.org>, 642129@bugs.debian.org
Cc: submit@bugs.debian.org
Subject: Re: Bug#642129: debhelper: Please allow brace expansion in debhelper config files
Date: Mon, 19 Sep 2011 14:34:49 -0400
[Message part 1 (text/plain, inline)]
Guillem Jover wrote:
> Due to a bug in lintian the brace-expansion-in-debhelper-config-file
> warning (introduced in 2.1.4) did not trigger until lintian 2.5.2,
> which made it difficult to realize there was a problem with it at
> all until recently.
> 
> dpkg started using brace expansion [0] due to a change in debhelper
> 4.9.5 which made wildcards expanding to nothing to error out.
> 
> I don't know what made Raphaël think that was supported, maybe just
> trial and error, but it seems like a rather elegant “solution”. In any
> case I don't want to justify the fact that dpkg is using undocumented
> behaviour (I'm aware of #480868 and #480939) and that debhelper
> should support it because packages are using it. Just wanted to request
> if this could become a sanctioned behaviour because it truly seems
> useful and elegant. In case you still don't want to support it, could
> you consider instead to add an option to not fail on wildcards expanding
> to nothing, so that we can revert to our old debhelper config files,
> w/o needing to move most of the install files to debian/rules?

It doesn't seem very elegant. It relies on a quirk of perl's glob
engine. 

Notice that, {foo*,otherfile*} will only succeed as long as one of
the interior globs match; if both globs fail it will stop. It's
not really doing what you want; what you want is available via
DH_COMPAT=4.

And if that's tweaked to {foo,otherfile*} it will, instead of only
expanding to existing files, now it always expand to "foo" even when
that doesn't exist.

And then there's the way that it conflicts with the proposed syntax
for ${VAR} expansions in debhelper config files..

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#642129; Package debhelper. (Mon, 19 Sep 2011 18:37:26 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. (Mon, 19 Sep 2011 18:37:26 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#642129; Package debhelper. (Mon, 19 Sep 2011 20:15:43 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. (Mon, 19 Sep 2011 20:15:43 GMT) Full text and rfc822 format available.

Message #20 received at 642129@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: Joey Hess <joeyh@debian.org>
Cc: 642129@bugs.debian.org
Subject: Re: Bug#642129: debhelper: Please allow brace expansion in debhelper config files
Date: Mon, 19 Sep 2011 22:12:17 +0200
On Mon, 2011-09-19 at 14:34:49 -0400, Joey Hess wrote:
> Guillem Jover wrote:
> > dpkg started using brace expansion [0] due to a change in debhelper
> > 4.9.5 which made wildcards expanding to nothing to error out.
> > 
> > I don't know what made Raphaël think that was supported, maybe just
> > trial and error, but it seems like a rather elegant “solution”. In any
> > case I don't want to justify the fact that dpkg is using undocumented
> > behaviour (I'm aware of #480868 and #480939) and that debhelper
> > should support it because packages are using it. Just wanted to request
> > if this could become a sanctioned behaviour because it truly seems
> > useful and elegant. In case you still don't want to support it, could
> > you consider instead to add an option to not fail on wildcards expanding
> > to nothing, so that we can revert to our old debhelper config files,
> > w/o needing to move most of the install files to debian/rules?
> 
> It doesn't seem very elegant. It relies on a quirk of perl's glob
> engine. 

I guess I didn't make myself clear, I find it elegant given the
constraints and knowledge/assumption at the time. That's why I
wrote: “solution”. Having to move the installation handling into
debian/rules does not seem very elegent to me, but we will if there's
no other alternative, of course.

Regarding perl's glob engine, it explicitly supports brace expansion
as mentioned on the documentation, so I don't see how that's a quirk.
If you mean the quirk is expecting dehelper to use perl's glob, well
as said before, sure.

> Notice that, {foo*,otherfile*} will only succeed as long as one of
> the interior globs match; if both globs fail it will stop. It's
> not really doing what you want; what you want is available via
> DH_COMPAT=4.
> 
> And if that's tweaked to {foo,otherfile*} it will, instead of only
> expanding to existing files, now it always expand to "foo" even when
> that doesn't exist.

In other cases it might not, but in dpkg case it's doing exactly what
we want regarding man page translations, this is our common pattern:

  usr/share/man/{*/*,*}/dpkg-deb.1

because usr/share/man/man1/dpkg-deb.1 should always exist (it's the
untranslated file), and things like usr/share/man/fr/man1/dpkg-deb.1
or usr/share/man/de/man1/dpkg-deb.1 might or might not exist, but we
don't really care as they are optional.

Also I don't think switching back to compat level 4 is much of an
option, being it documented as deprecated.

> And then there's the way that it conflicts with the proposed syntax
> for ${VAR} expansions in debhelper config files..

If variable expansion is always performed before globbing, then I
don't see the problem?


In any case, as stated before, anything that allows us to keep the
installation logic confined in dh_install config files would be ideal.
Either permitting brace expansion, adding an option to get back the
non-failing empty glob expansion, a way to mark optional files
as such inline, or something else you could come up with.

thanks,
guillem




Reply sent to Joey Hess <joeyh@debian.org>:
You have taken responsibility. (Wed, 07 Dec 2011 19:34:17 GMT) Full text and rfc822 format available.

Notification sent to Guillem Jover <guillem@debian.org>:
Bug acknowledged by developer. (Wed, 07 Dec 2011 19:34:17 GMT) Full text and rfc822 format available.

Message #25 received at 642129-close@bugs.debian.org (full text, mbox):

From: Joey Hess <joeyh@debian.org>
To: 642129-close@bugs.debian.org
Subject: Bug#642129: fixed in debhelper 8.9.12
Date: Wed, 07 Dec 2011 19:33:03 +0000
Source: debhelper
Source-Version: 8.9.12

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

debhelper_8.9.12.dsc
  to main/d/debhelper/debhelper_8.9.12.dsc
debhelper_8.9.12.tar.gz
  to main/d/debhelper/debhelper_8.9.12.tar.gz
debhelper_8.9.12_all.deb
  to main/d/debhelper/debhelper_8.9.12_all.deb



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 642129@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joey Hess <joeyh@debian.org> (supplier of updated debhelper 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 ftpmaster@debian.org)


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

Format: 1.8
Date: Wed, 07 Dec 2011 15:09:50 -0400
Source: debhelper
Binary: debhelper
Architecture: source all
Version: 8.9.12
Distribution: unstable
Urgency: low
Maintainer: Joey Hess <joeyh@debian.org>
Changed-By: Joey Hess <joeyh@debian.org>
Description: 
 debhelper  - helper programs for debian/rules
Closes: 235302 372310 438601 477625 614731 632860 642129 651221 651224
Changes: 
 debhelper (8.9.12) unstable; urgency=low
 .
   * Debhelper config files may be made executable programs that output the
     desired configuration. No further changes are planned to the config file
     format; those needing powerful syntaxes may now use a programming language
     of their choice. (Be careful aiming that at your feet.)
     Closes: #235302, #372310, #235302, #614731,
     Closes: #438601, #477625, #632860, #642129
   * Added German translation of man pages, done by Chris Leick. Closes: #651221
   * Typo fixes. Closes: #651224 Thanks, Chris Leick
Checksums-Sha1: 
 9737ff50de2c404b43fa699ac9ffd3c5001b7889 1561 debhelper_8.9.12.dsc
 90c731d73c65b5690aa9634782317f5c0aaf722b 457449 debhelper_8.9.12.tar.gz
 dfd71bb77a117da7b79d67edcd83ac3b613dae0f 693304 debhelper_8.9.12_all.deb
Checksums-Sha256: 
 67ffe0e94f249a2a5a799d1ecf63618470cf1b9196a38d7d985b6a366fb45b9b 1561 debhelper_8.9.12.dsc
 ba5d19df5f1583efc8f9d433c229a652f3a83d0a9a3d553001e996b3e935980f 457449 debhelper_8.9.12.tar.gz
 08a4b3079fb9f4f52642ff10aeca8e7b5abee64915520743b9e283f7d04c3933 693304 debhelper_8.9.12_all.deb
Files: 
 003f53a81bd3d2b0033745a0c951d218 1561 devel optional debhelper_8.9.12.dsc
 4a54f779263c54a37e423b19b456e1b3 457449 devel optional debhelper_8.9.12.tar.gz
 9afbc8d939dfdefadf50103f2cbb7003 693304 devel optional debhelper_8.9.12_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIVAwUBTt+8FckQ2SIlEuPHAQiUFBAAmBqWVI3sbJIbd5PhEF2dPdo5qzLMZDIf
WMq09nVIJnw8oLQrb54vFa+JRIhrQZyzndLjJFXN2umu1ZYvITnR4FsA3f2zfJfp
sNHL1vQ8ldjAVJQeL+q9M0V92K2GACb8EBOW+XqIEJzxA74U/NQ9592zo0+myvAc
bBWiy04N3l9W7Y1ltxioLtBSJX8lLwt5fXdAG/t3dntv1fFMHdkw0LfQJgijaJMB
xyZW2xMHNdSJvKwiwUQdqepW2fKf8T+ayuJ7WYtgGne2B1hNeIZr7ZzKouccMWjY
FJVlvlRn07LkvpzFUga2KH9DjMgxlI3FP8yec2aQ+B5f/1ZQWulXKIQnF8v0imHC
rfnj3XATQ6I1SQCh74fYIVr+90jguQMKC9nZafNhq5nwssuLZ37jfk6ZcW6XB3hW
b1Jf3ogzZNez9tAuGvnZkBkKVb6frMIJgRrQxUQUh6a+g1Utpl/wXsOJrPKAgQmn
r1jzabh/Enx/6uhfDqUIHtUFz2hjAcCraWE55EXPlE/SChsGDe7qCXNcp0n+SWh3
aZpmJ/bTQNp2sOtK8IUbFSlxiSwcto9nMOzx0x2B7HqO9bO29niK+CJiWaGcPOMF
ONGqEL7Nf4MIZzNO8yJXYAIJVfE7jDzJZXB5pquaM+J3qEytKm8j5FQ5V+GEV763
SuDxx/V7N2s=
=1Cqd
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 05 Jan 2012 07:33:55 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 11:21:06 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.