[debhelper-devel] Bug#698054: debhelper: dh_install seems to call all executable debian/*.install files even with -p<package>

Gergely Nagy algernon at madhouse-project.org
Wed Sep 23 07:19:22 UTC 2015


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]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 698054-repro.tar.gz
Type: application/gzip
Size: 2539 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20150923/d1c85fa2/attachment-0004.bin>


More information about the debhelper-devel mailing list