Ubuntu

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

Reported by David Bierce on 2011-11-23
200
This bug affects 19 people
Affects Status Importance Assigned to Milestone
pkgbinarymangler (Ubuntu)
High
Martin Pitt
Precise
High
Martin Pitt
qt4-x11 (Ubuntu)
High
Martin Pitt
Precise
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)

David Bierce (cppe-david) wrote :
affects: ubuntu → qt4-x11 (Ubuntu)
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
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
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) on 2011-11-23
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
userdce (userdce) wrote :

any workaround?

Anders Kaseorg (anders-kaseorg) wrote :

Workaround:

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

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
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
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) on 2011-11-29
Changed in pkgbinarymangler (Ubuntu Precise):
status: In Progress → Fix Committed
importance: Medium → High
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
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
Martin Pitt (pitti) wrote :

Verified that libqt4-xmlpatterns:i386 installs fine now.

To post a comment you must log in.