[debhelper-devel] Bug#747141: Bug#747141: Bug#747141: debhelper: "dh_installdocs --link-doc" breaks binNMUs

Niels Thykier niels at thykier.net
Sun Nov 16 19:02:08 UTC 2014


On 2014-11-16 17:39, Niels Thykier wrote:
> Hi Bernhard,
> 
> Thanks for looking into this. :)
> 
> [...]
> 
> I think the patch is definitely a good start.  However, I do think that
> detecting and error'ing out on the "broken binNMU" case should be
> trivially enough and much better than "silently"[1] continuing with the
> build.
>   I will look into extending your patch to handle that case as well.
> 
> ~Niels
> 
> [1] There will be the warning, but no one reads the logs from the
> buildds before it is too late.
> 
> [...]

I got an extended patch (see attached diff file) that errors out on
*some* binNMUs.  Turns out that there is a case it does not handle and
that will be difficult to deal with.

The problem is when an arch:all package links to an arch:any package.
In binNMU build, dh_installdocs will not see the "arch:all" package as
it is told not to act on it.  This means that:

"""
  if (package_arch($package) ne package_arch($dh{LINK_DOC})) {
"""

will never be true during a binNMU.  This is because $package will never
be an arch:all package (as they are not acted on) and $dh{LINK_DOC} will
be an architecture dependent package (per definition of this case).
Accordingly there will never be a warning or an error.


We could resolve this by creating an
  "$dh{LINK_DOC} >= $dh{VERSION}, $dh{LINK_DOC} << $dh{VERSION}+bA~"
dependency.  Unfortunately, the dependency is only created on source
uploads (when the arch:all package is built), so that would /not/ be an
retroactive bug fix. :-/

Test cases:
 * python-apt/0.9.3.11
   - even with my patch, a binNMU the build succeeds (without any
     warnings).
 * thunar/1.6.3
   - with my patch, the issue is detected and the build is aborted.

For testing a binNMU build, use:
   "dch -p --bin-nmu '' && dpkg-buildpackage -B"

~Niels


-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug-768619.diff
Type: text/x-patch
Size: 2044 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20141116/c261d4b5/attachment-0002.bin>


More information about the debhelper-devel mailing list