Package: dh-r
Severity: wishlist
X-Debbugs-Cc: [email protected]


Hi,

Similar to https://bugs.debian.org/1091921 for routine update,
consider replacing the ad-hoc compat level detection (I noticed it in at least dh-update-R) with `dh_assistant active-compat-level`.


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

PS: The `perl-code` package provides a JSON parser via the `JSON::PP` module, so a proper JSON parsing module will not require an extra dependency.

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to