Package: debhelper
Version: 7.4.16
Severity: normal

In 7.4.16, this change was made:

  * If neither -a or -i are specified, debhelper commands used to default
    to acting on all packages in the control file, which was a guaranteed
    failure if the control file listed packages that did not build for the
    target architecture. After recent optimisations, this default behavior
    can efficiently be changed to the more sane default of acting on only
    packages that can be built for the current architecture. This change
    is mostly useful when using minimal rules files with dh. Closes: #572077

That seemed fairly safe (one package made an assumption and got broken).
But it was not a complete fix.

Consider a package like which has multiple binary packages, some
that only build on some arches. And it uses -N:

        dh_installdocs -N some-arch-specific-binary

This will, currently, somewhat suprisingly, cause it to act on
all other binary packages, even those that do not build for the current arch.

To work around the problem, the user has to know to add -a.

It would probably be possible to fix that the same as was done with the
above change, and without much back-compat issue, since this is a
suprising behavior, not one users are likely to have relied on. I think
it would be a little hard to implement, since debhelper does not track
how it arrives at the set of packages it will act on, so doesn't know it
got there via a -N.

The same problem could be considered to affect use of -p also. After all,
if a user does "-p some-arch-specific-binary", that package will always
be acted on, even when the build arch is wrong.

I worry that users might be reliying on -p always forcing action on a
package. For example:

        dh_installdocs -p some-arch-specific-binary
        cp foo debian/some-arch-specific-binary/usr/share/doc/

If it's fixed for both -p and -N, then implementation does become easy.
Just filter out packages not for the build arch after getting the list
of packages to act on.

That change may need to wait for a compatability level change.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to