Source: binutils
Version: 2.29-7
Severity: wishlist
User: [email protected]
Usertags: rebootstrap

Hi Matthias,

thanks for merging my binutils-for-host patches. I looked at the
resulting packages and found a couple of remaining issues. The attached
patch addresses them.

1. I forgot to remove the dependency from binutils-<triplet> on
   binutils. You indicated that it may be necessary to ensure
   availability of ldscripts, but using that dependency doesn't work.
   Since binutils-<triplet> is Multi-Arch: foreign, you cannot tell
   which binutils will be installed. Thus what you get is "some"
   ldscripts for a semi-random architecture. The dependency simply needs
   to go away.

   You indicated that overlapping ldscripts should match across
   architectures, so they could be installed into some m-a:same package.
   That appears to contradict the comments in debian/rules telling the
   contrary. What is correct here?

   Due to these conflicts, Debian's cross binutils have never provided
   ldscripts. I haven't seen a single build failure due to missing
   ldscripts (in over 3000 different cross builds). Thus I conclude that
   it is best to say: If you need ldscripts, use "Build-Depends:
   binutils".  Otherwise, use binutils-for-host. Thus the dependency can
   be removed.

2. There is a typo in my patch 8, which causes d/control generation to
   break when TARGET is set (i.e. targeted cross binutils). A sed
   expression is missing an "@".

3. In my patch, I was linking the documentation of binutils-for-host to
   the documentation of its only dependency binutils-<triplet> to avoid
   putting up another copy. Unfortunately, this is inappropriate for
   packages marked Multi-Arch: same. If documentation linking is used
   here, the same target must be used for all instances. I thus propose
   to use binutils-common here.

4. binutils-common is marked Multi-Arch: same. The package really only
   has architecture-independent files. The only (and good) reason to
   make it Architecture: any is to avoid version skews due to buildd
   timing. Thus the package should be marked Multi-Arch: foreign instead
   to avoid users having to download it over and over again for multiple
   architectures.

   If you want to stick with Multi-Arch: same, the binutils-common
   package should simply be merged with libbinutils, because both are
   implementation details. I can provide a patch for doing so. Just
   using Multi-Arch: same on binutils-common doesn't make any sense.

Helmut
diff -u binutils-2.29/debian/changelog binutils-2.29/debian/changelog
--- binutils-2.29/debian/changelog
+++ binutils-2.29/debian/changelog
@@ -1,3 +1,12 @@
+binutils (2.29-8) UNRELEASED; urgency=medium
+
+  * Point /usr/share/doc/binutils-for-host at binutils-common.
+  * Mark binutils-common Multi-Arch: foreign.
+  * Remove binutils dependency from binutils-<triplet>.
+  * Fix typo in control.in interpolation when TARGET is non-empty.
+
+ -- Helmut Grohne <[email protected]>  Thu, 24 Aug 2017 21:49:21 +0200
+
 binutils (2.29-7) unstable; urgency=high
 
   * Fix binutils dependency on binutils-<triplet> on non amd64 architectures.
diff -u binutils-2.29/debian/control.cross.in 
binutils-2.29/debian/control.cross.in
--- binutils-2.29/debian/control.cross.in
+++ binutils-2.29/debian/control.cross.in
@@ -1,7 +1,7 @@
 
 Package: binutils-@target@
 Architecture: @host_archs@
-Depends: binutils (= ${binary:Version}), binutils-common (= ${binary:Version}),
+Depends: binutils-common (= ${binary:Version}),
   ${shlibs:Depends}, ${extraDepends}
 Suggests: binutils-doc (= ${source:Version})
 Provides: @binutils_alt_triplet@
diff -u binutils-2.29/debian/control.in binutils-2.29/debian/control.in
--- binutils-2.29/debian/control.in
+++ binutils-2.29/debian/control.in
@@ -15,7 +15,7 @@
 
 Package: binutils-for-host
 Architecture: any
-Depends: ${binutils:native} (>= ${binutils:minver})
+Depends: ${binutils:native} (>= ${binutils:minver}), binutils-common (= 
${binary:Version})
 Multi-Arch: same
 Description: GNU assembler, linker and binary utilities for the host 
architecture
  The programs in this package are used to assemble, link and manipulate
@@ -139,7 +139,7 @@
 
 Package: binutils-common
 Architecture: any
-Multi-Arch: same
+Multi-Arch: foreign
 Breaks: binutils (<< 2.29-6)
 Replaces: binutils (<< 2.29-6)
 Description: Common files for the GNU assembler, linker and binary utilities
diff -u binutils-2.29/debian/rules binutils-2.29/debian/rules
--- binutils-2.29/debian/rules
+++ binutils-2.29/debian/rules
@@ -552,7 +552,7 @@
 
 stamps/control: debian/control.in $(if $(TARGET),debian/control.cross.in) $(if 
$(filter yes, $(with_cross)),debian/control.cross.in)
 ifneq (,$(TARGET))
-       sed -n -e 's/@dpkg_dev/$(DPKG_DEV)/;/^Package: 
binutils-for-build$$/q;p' \
+       sed -n -e 's/@dpkg_dev@/$(DPKG_DEV)/;/^Package: 
binutils-for-build$$/q;p' \
                < debian/control.in > debian/control
        sed -e "s/@target@/$$(echo -n $(TARGET) | sed s/_/-/g)/" \
                -e "s/@host_archs@/any/" \
@@ -1421,7 +1421,7 @@
 
        rm -fr $(d_hst)
        $(install_dir) $(d_hst)/DEBIAN/ $(d_hst)/$(PF)/share/doc/
-       ln -sf $(p_nat) $(d_hst)/$(PF)/share/doc/$(p_hst)
+       ln -sf $(p_com) $(d_hst)/$(PF)/share/doc/$(p_hst)
 
        rm -f debian/substvars
        dpkg-gencontrol -P$(d_hst) -p$(p_hst) \

Reply via email to