symlinked docs are different between architectures, depending on dpkg-deb package order

Bug #893826 reported by David Bierce
200
This bug affects 19 people
Affects Status Importance Assigned to Milestone
pkgbinarymangler (Ubuntu)
Fix Released
High
Martin Pitt
Precise
Fix Released
High
Martin Pitt
qt4-x11 (Ubuntu)
Fix Released
High
Martin Pitt
Precise
Fix Released
High
Martin Pitt

Bug Description

Error while running do-release-upgrade -d from latest 11.10

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: libqt4-xmlpatterns 4:4.7.4-1ubuntu3
ProcVersionSignature: Ubuntu 3.0.0-13.22-generic 3.0.6
Uname: Linux 3.0.0-13-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Tue Nov 22 17:07:04 2011
ErrorMessage: ErrorMessage: './usr/share/doc/libqt4-xmlpatterns/LGPL_EXCEPTION.txt' is different from the same file on the system
SourcePackage: qt4-x11
Title: package libqt4-xmlpatterns 4:4.7.4-1ubuntu3 failed to install/upgrade: ErrorMessage: './usr/share/doc/libqt4-xmlpatterns/LGPL_EXCEPTION.txt' is different from the same file on the system
UpgradeStatus: Upgraded to precise on 2011-11-22 (0 days ago)

Revision history for this message
David Bierce (cppe-david) wrote :
affects: ubuntu → qt4-x11 (Ubuntu)
Revision history for this message
Felix Geyer (debfx) wrote :

Looks like dpkg-deb is being called in a different order so pkgbinarymangler symlinks LGPL_EXCEPTION.txt to different packages.

On amd64:
pkgstripfiles: processing control file: debian/libqt4-xmlpatterns/DEBIAN/control, package libqt4-xmlpatterns, directory debian/libqt4-xmlpatterns
.. removing usr/share/doc/libqt4-xmlpatterns/changelog.gz
Searching for duplicated docs in dependency libqt4-network...
  symlinking LGPL_EXCEPTION.txt in libqt4-xmlpatterns to file in libqt4-network
  symlinking changelog.Debian.gz in libqt4-xmlpatterns to file in libqt4-network
Searching for duplicated docs in dependency libqtcore4...
dpkg-deb: warning: 'debian/libqt4-xmlpatterns/DEBIAN/control' contains user-defined field 'Original-Maintainer'
dpkg-deb: warning: ignoring 1 warning about the control file(s)

On i386:
pkgstripfiles: processing control file: debian/libqt4-xmlpatterns/DEBIAN/control, package libqt4-xmlpatterns, directory debian/libqt4-xmlpatterns
.. removing usr/share/doc/libqt4-xmlpatterns/changelog.gz
Searching for duplicated docs in dependency libqt4-network...
Searching for duplicated docs in dependency libqtcore4...
  symlinking LGPL_EXCEPTION.txt in libqt4-xmlpatterns to file in libqtcore4
  symlinking changelog.Debian.gz in libqt4-xmlpatterns to file in libqtcore4
dpkg-deb: warning: 'debian/libqt4-xmlpatterns/DEBIAN/control' contains user-defined field 'Original-Maintainer'
dpkg-deb: warning: ignoring 1 warning about the control file(s)

Changed in qt4-x11 (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

pkgstripfiles searches dependencies in the order of the Depends: field. Seems for some reason this is different on i386 and amd64.

Changed in pkgbinarymangler (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Ah, turns out to not be an issue of the Depends: field itself, but in the order binaries are processed:

debfx | pitti: the order of the dependencies is the same but on i386 pkgbinarymangler has already processed libqt4-network before libqt4-xmlpatterns

Changed in pkgbinarymangler (Ubuntu):
status: In Progress → Triaged
Martin Pitt (pitti)
summary: - package libqt4-xmlpatterns 4:4.7.4-1ubuntu3 failed to install/upgrade:
- ErrorMessage: './usr/share/doc/libqt4-xmlpatterns/LGPL_EXCEPTION.txt' is
- different from the same file on the system
+ symlinked docs are different between architectures, depending on dpkg-
+ deb package order
Revision history for this message
userdce (userdce) wrote :

any workaround?

Revision history for this message
Anders Kaseorg (andersk) wrote :

Workaround:

rm -f /usr/share/doc/{libqt4-xmlpatterns,libqt4-network,libqtgui4}/{LGPL_EXCEPTION.txt,changelog.Debian.gz}
apt-get install -f

Revision history for this message
Loïc Minier (lool) wrote :

I had to run the workaround again today with one more package:
rm -f /usr/share/doc/{libqt4-xmlpatterns,libqt4-network,libqtgui4,libqt4-declarative}/{LGPL_EXCEPTION.txt,changelog.Debian.gz}

tags: added: rls-mgr-p-tracking
Revision history for this message
Martin Pitt (pitti) wrote :

debhelper's dh_builddeb is predictable, it processes packages in the order they appear in debian/control. The problem in this particular case is that qt4-x11 runs them all in parallel:

   dh_builddeb -u -Zlzma -O--parallel
INFO: pkgstriptranslations version 106
INFO: pkgstriptranslations version 106
INFO: pkgstriptranslations version 106
INFO: pkgstriptranslations version 106
INFO: pkgstriptranslations version 106
INFO: pkgstriptranslations version 106
INFO: pkgstriptranslations version 106
INFO: pkgstriptranslations version 106
[...]

That's what makes the build order unpredictable.

Changed in pkgbinarymangler (Ubuntu Precise):
status: Triaged → In Progress
Changed in qt4-x11 (Ubuntu Precise):
assignee: nobody → Martin Pitt (pitti)
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

For the record, I have created a test case in pkgbinarymangler now which reproduces that, and Colin, Adam, and I discussed a solution today. This will be fixed tomorrow morning.

Martin Pitt (pitti)
Changed in pkgbinarymangler (Ubuntu Precise):
status: In Progress → Fix Committed
importance: Medium → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pkgbinarymangler - 107

---------------
pkgbinarymangler (107) precise; urgency=low

  * test/run, test_doc_symlink(): Simplify installation of "Makefile".
  * test/run, test_doc_symlink(): Introduce some test library binary packages
    to check handling of transitive dependencies.
  * pkgstripfiles, symlink_doc(): If the link destination target is itself a
    link, resolve it to directly link to the final target instead of not
    symlinking the file at all.
  * test/run: Add new test cases test_doc_symlink_parallel_{fixed,unlimited}()
    which run the symlink test with DEB_BUILD_OPTIONS "parallel=4" and
    "parallel" respectively. Run through them three times as this is a race
    condition and does not trigger every time. This reproduces LP #893826.
  * Add dh_builddeb: Wrapper around the debhelper command which filters out
    the "parallel" option from $DEB_BUILD_OPTIONS. We must not run dpkg-deb in
    parallel as this breaks a predictable doc symlink structure which we
    require for multi-arch. (LP: #893826)
  * debian/pkgbinarymangler.install: Install dh_builddeb wrapper.
  * debian/pkgbinarymangler.{preinst,postrm}: Set up diversion for
    dh_builddeb.
 -- Martin Pitt <email address hidden> Tue, 29 Nov 2011 10:00:54 +0100

Changed in pkgbinarymangler (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qt4-x11 - 4:4.7.4-1ubuntu5

---------------
qt4-x11 (4:4.7.4-1ubuntu5) precise; urgency=low

  * No-change rebuild against pkgbinarymangler with multi-arch doc symlinking
    fix. (LP: #893826)
 -- Martin Pitt <email address hidden> Tue, 29 Nov 2011 10:24:42 +0100

Changed in qt4-x11 (Ubuntu Precise):
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Verified that libqt4-xmlpatterns:i386 installs fine now.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.