I just managed to reproduce this, test package attached.

What happens is that if dh_install gets called with -pfoo, then
foo.install will still be read and executed, but no copying will
happen. The contents are needed for --list-missing/--fail-missing, as
far as I see.

The problem only manifests when the .install file is executable, and has
side-effects, like in the case of dh-exec renaming a file.

To combat this, debhelper really needs to pass down an environment
variable, so dh-exec can know when to avoid side-effects. I tried
various other solutions, such as a dh-exec sequence (and a
dh_exec_init/dh_exec_deinit pair), but that was quickly discarded,
because it's either incredibly painful to use, or unreliable, or
both. So the only sane way is for debhelper to set an environment
variable which dh-exec can use.

I suggest _DH_DO_PACKAGES, which can be set/unset from
Dh_Lib::filedoublearray, just when running the executable script. I'll
submit a patch in a few minutes.

-- 
|8]

Attachment: 698054-repro.tar.gz
Description: application/gzip

Reply via email to