[Debian-med-packaging] Bug#1091921: routine-update: Use `dh_assistant` instead of ad-hoc debhelper compat parsing
Niels Thykier
niels at thykier.net
Thu Jan 2 14:54:47 GMT 2025
Package: routine-update
Severity: wishlist
X-Debbugs-Cc: niels at thykier.net
I noticed that `routine-update` is doing its own parsing of the
`debhelper` compat levels. Furthermore, it is not aware of the third way
of setting compat levels (that replaces `debian/compat` for experimental
compat levels - you can see it in use in the `debhelper` source code).
I would recommend that you migrate the script to use:
dh_assistant active-compat-level
from sid/testing or stable-backports.
It will produce JSON output like:
{
"active-compat-level": 13,
"declared-compat-level": 13,
"declared-compat-level-source": "Build-Depends: debhelper-compat (= 13)"
}
With `declared-compat-level` and possibly `declared-compat-level-source`
being what you are interested in. The `active-compat-level` also
accounts for the `DH_COMPAT` ENV variable, which will not be relevant in
your case (as that variable would only be used inside `d/rules`; not
outside it).
For packages without compat levels at all, the command still succeeds
but each affected attribute is then set to `null`.
More documentation at `man dh_assistant`.
You may also find `dh_assistant supported-compat-levels` relevant as it
provides you with information about compat levels. Such as the latest
stable one, or the minimum supported compat level for
`debhelper-compat (= X)` relations.
Best regards,
Niels
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/debian-med-packaging/attachments/20250102/cfd6741a/attachment.sig>
More information about the Debian-med-packaging
mailing list