Bug#972724: dh_missing: allow dealing with manually (cp commands in d/rules) installed files
Niels Thykier
niels at thykier.net
Wed Feb 17 17:17:44 GMT 2021
Norbert Preining:
> Package: debhelper
> Version: 13.2.1
> Severity: normal
> X-Debbugs-Cc: pkg-kde-talk at alioth-lists.debian.net
>
> Hi
>
Hi,
> sometimes we need to install files depending on the architecture, so
> some files are *not* installed on a subset of the architectures (example
> kdeplasma-addons). This seems to be impossible with dh_install's .install
> files, so what we are doing is copy the files in d/rules.
>
Indeed, this is not possible using only native debhelper features.
Depending on the concrete scenario, you might be able to rely on dh-exec
for this though.
> But these files are not seen by dh_install because it only checks the
> logged files, and not the *actually* installed files
>
> (BTW **why** does dh_missing not compare the actually installed files in
> debian/$package/ against the files in debian/tmp, and instead relies on
> all helpers correctly updating the list of installed files? This seems
> rather error prone as we see).
>
Checking what is installed fails in the general case for "binary-indep"
vs "binary-arch" builds and when the file in question is only produced
either "always", "only in the -indep case" or "only in the -arch case".
Jumping through some hoops, the looping method can handle these (by
having the dh_* log what it "would have" installed in all cases).
Obviously it has its flaws. The case you present here being one of them
(the other being additional complexity in helper tools)
> Of course I can stash them into d/not-installed, but that sounds wrong,
> since these files **are** installed, only not via a debhelper tool.
>
> Best
>
> Norbert
>
> [...]
To my knowledge, you can use the following work arounds for this issue:
* Use dh-exec and its filtering in combination with the debhelper tool.
* (Ab)use debian/not-installed
* (Ab)use another means to get a dh_tool to install it.
* Manually register the file as installed[1]
~Niels
[1]:
It should be something like:
mkdir -p debian/.debhelper/generated/${package}/
echo "usr/lib/file-or-dir/you/want/dh_missing/to/know/about >> \
debian/.debhelper/generated/${package}/installed-by-debian-rules
You can either always run it or only when the file is correctly
installed. See /usr/share/doc/debhelper/PROGRAMMING.gz section "Logging
helpers and dh_missing:" (notably "Other helpers:" beneath it) for the
exact details.
More information about the pkg-kde-talk
mailing list