[debhelper-devel] Bug#798414: Bug#798414: debhelper: empty support file should imply no-op

Niels Thykier niels at thykier.net
Wed Sep 9 05:48:43 UTC 2015


Control: tags -1 moreinfo

On 2015-09-09 00:52, Michael Banck wrote:
> Package: debhelper
> Version: 9.20150101
> Severity: wishlist
> 
> Dear Maintainer,
> 
> I had the case of one upstream package shipping a useless ChangeLog file
> (basically having "check Github" as content).  dh_installchangelogs
> installs this file automatically, unless I manually intervene.  The only
> way to do so seems to be to add additional targets to debian/rules.  
> 
> My original idea of just shipping an empty debian/<package>.changelog
> file did not work, debhelper aborted with an error.
> 
> So I'm filing this wishlist bug for consideration of empty support files
> to imply no-ops rather than errors.  I think that would be an elegant
> design, but I am not sure whether this is in line with dh in general.
> 
> 
> Michael
> 
> [...]

Hi Michael,

Thanks for your suggestion.

Unfortunately, I am not convinced it can be trivially implemented as
such. In particular, please note that you probably do not want
dh_installchangelogs to be a (complete) no-op as it also installs the
Debian changelogs.

A couple of notes:

 * debian/<pkg>.changelog is *not* the debhelper config file for
   dh_installchangelogs, but rather the *actual* changelog to put
   in that package.
   - That is why it breaks when it is empty.

 * A completely empty override target in debian/rules will make the
   command "disappear" from the sequence.  Note that is must not
   contain a "comment-command"[1].
   - Useful for skipping other "dh_*"-commands, but maybe not
     dh_installchangelogs.

 * Beyond dh_installchangelogs: Some commands have side-effects
   beyond their arguments and their helper files.

So far, the best solution I can come up with is to use the -X feature.

Thanks,
~Niels

[1] This works:

"""
# Skip dh_changelogs
override_dh_changelogs:
"""

This calls "# Skip dh_changelogs", which is a no-op but more noisy than
needed:

"""
override_dh_changelogs:
	# Skip dh_changelogs
"""



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20150909/fa424c54/attachment-0001.sig>


More information about the debhelper-devel mailing list