Control: retitle -1 debhelper: dh_install, globs vs. executable files
Control: tags -1 -moreinfo

Gioele Barabucci:
On 12/10/23 14:54, Niels Thykier wrote:
Gioele Barabucci:
On 12/10/23 14:11, Niels Thykier wrote:
```
debian/tmp/usr/share/man/*/man1/foo.1
```

is correctly expanded by dh_install (`d/pkg.install`) but it causes dh_installman (`d/pkg.manpages`) to fail.

Whatever problem you are experiencing, it is *not* that `dh_installman`does not support globs, because definitely does as debhelper itself would FTBFS otherwise (`debian/debhelper.mapages` includes globs).

maybe it is the combination of dh_installman + dh-exec?

        When  using executable debhelper config files, please be aware of
        the following:

            Otherwise,  the  output will be used exactly as‐is.  Notably,
            debhelper will **not expand  wildcards** or  strip  comments
            or strip whitespace in the output.

This surprises me a bit. util-linux currently uses both dh-exec and wildcards in `d/util-linux-locales.install` and it works as "expected" (but not as documented?):

https://salsa.debian.org/debian/util-linux/-/blob/f7d972e9d/debian/util-linux-locales.install

Doesn't this mean that `dh_install` expands the globs found in the output of the executable `foo.install`?

Regards,


It does; `dh_install` is a special snowflake of doing everything differently than anything else. The `dh_install` helper manually does the glob'ing rather than using the `filedoublearray` for glob expansion. As a historical artefact, it never knew whether the `install` file executable and therefore the restriction never fully applied there.

This artefact has (also) been there since the introduction of executable debhelper config files.

I will accept this as a bug for dh_install not behaving as documented. I am probably going to end with ratifying the current behaviour rather than removing glob support (because removing glob support would require more code and break anyone relying on it even though it should not work).

For everything else, glob support should be done by the executable itself (possibly indirectly via dh-exec).

Best regards,
Niels

Reply via email to