Debian Bug report logs - #932152
debhelper: Make commands use pkgname.name.fragment automatically?

version graph

Package: src:debhelper; Maintainer for src:debhelper is Debhelper Maintainers <[email protected]>;

Reported by: Guillem Jover <[email protected]>

Date: Mon, 15 Jul 2019 22:57:02 UTC

Severity: wishlist

Found in version debhelper/12.2

Reply or subscribe to this bug.

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


Report forwarded to [email protected], Debhelper Maintainers <[email protected]>:
Bug#932152; Package src:debhelper. (Mon, 15 Jul 2019 22:57:05 GMT) (full text, mbox, link).


Acknowledgement sent to Guillem Jover <[email protected]>:
New Bug report received and forwarded. Copy sent to Debhelper Maintainers <[email protected]>. (Mon, 15 Jul 2019 22:57:05 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Guillem Jover <[email protected]>
To: [email protected]
Subject: debhelper: Make commands use pkgname.name.fragment automatically?
Date: Tue, 16 Jul 2019 00:53:00 +0200
Source: debhelper
Source-Version: 12.2
Severity: wishlist

Hi!

I've noticed when using the dh sequencer, one of the common reasons
to override targets is to pass --name arguments to debhelper commands.
It would be nice if the name arguments would be inferred from the
presence of the filenames instead, so that if we have say:

  debian/pkgname-a.name-a.service
  debian/pkgname-a.name-b.service
  debian/pkgname-a.name-c.init
  debian/pkgname-b.name-d.logrotate

Then the commands would automatically use these w/o needing overrides.

Thanks,
Guillem



Information forwarded to [email protected], Debhelper Maintainers <[email protected]>:
Bug#932152; Package src:debhelper. (Tue, 16 Jul 2019 21:12:03 GMT) (full text, mbox, link).


Acknowledgement sent to Niels Thykier <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debhelper Maintainers <[email protected]>. (Tue, 16 Jul 2019 21:12:03 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Niels Thykier <[email protected]>
To: Guillem Jover <[email protected]>, [email protected]
Subject: Re: Bug#932152: debhelper: Make commands use pkgname.name.fragment automatically?
Date: Tue, 16 Jul 2019 20:53:00 +0000
Guillem Jover:
> Source: debhelper
> Source-Version: 12.2
> Severity: wishlist
> 
> Hi!
> 
> I've noticed when using the dh sequencer, one of the common reasons
> to override targets is to pass --name arguments to debhelper commands.
> It would be nice if the name arguments would be inferred from the
> presence of the filenames instead, so that if we have say:
> 
>   debian/pkgname-a.name-a.service
>   debian/pkgname-a.name-b.service
>   debian/pkgname-a.name-c.init
>   debian/pkgname-b.name-d.logrotate
> 
> Then the commands would automatically use these w/o needing overrides.
> 
> Thanks,
> Guillem
> 

Hi,

Thanks for the suggestion.  I think it would be great if we could
realize a change like this to reduce the number of overrides and to make
more packaging "just work(tm)".

For the concrete proposal, I note the following things:

 * Correctness: Both pkgname-X and name-X can contain periods.  In the
   average case, it is unlikely to be ambiguous.  However, will it be an
   issue?

   - E.g. firebird3.0-server has an init file called firebird3.0
     installed via dh_installinit --name firebird$(FB_VER)

 * Efficiency: Globbing debian/ is quite expensive for some packages
   because they put a lot of files in debian/.  So preferably, this
   should be a solution without globbing - or at least, without globbing
   for the cases without --name.

   - The existing logic for avoiding to call dpkg_architecture in
     pkgfile might be useful or even sufficient (haven't checked).
     This is particular relevant for dh(1), which uses pkgfile often
     to determine if a helper can be skipped.

   - This could be an argument for supporting "directories".  Related
     bug #455246 which asked for directories for arch-qualified
     "pkgfile"s.

 * The example implies that these tools must now work with 0..N
   "pkgfile"s rather than 0..1, which implies adding another loop to
   pretty much every helper.  The most sane option here is probably
   to replace the "pkgfile" sub with a different routine to avoid
   breaking existing helpers that do not transition at the same time
   as debhelper.

 * In case you have two "pkgfile"s - one with and one without "--name"
   respectively - AND need different options for the two files, then
   you effectively need to rename the file without to ensure that you
   only act on one file at the time.  Alternative being a special case
   for refering to an "unnamed" "pkgfile" - not sure what is better.

   - Note this case cannot be done without overrides in the first place
     and is not a prime candidate for optimization.

 * This will need a compat bump as some people currently call the same
   helper twice with and without --name.

Feedback / Concrete solutions and suggestions etc. are welcome.

Thanks,
~Niels




Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 12:41:49 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.