package libperl5.22 5.22.1-9 failed to install/upgrade: trying to overwrite shared '/usr/share/doc/libperl5.22/changelog.Debian.gz', which is different from other instances of package libperl5.22:i386

Bug #1574351 reported by Lazar Marius
566
This bug affects 103 people
Affects Status Importance Assigned to Milestone
perl (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
pkgbinarymangler (Ubuntu)
Fix Released
High
Balint Reczey
Bionic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * Pkgstripfiles generates different stripped documentation for arch:any packages depending on if arch:all packages are built at the same time. In practice it means that amd64 packages may end up different file contents of doc files compared to other architectures making multiarch installation of the affected packages impossible without workarounds.

 * To fix affected packages by a rebuild the pkgbinarymangler package needs to be backported, too.

 * The fix in pkgstripfiles is skipping symlinking documentation to dependent packages with identical content when the dependent packages are not built.

[Test Case]

 * To test pkgbinarymangler rebuild perl i386 packages without arch:all packages with the fixed pkgbinarymangler package and observe the following message in the build log:
...
Skipping perl-modules-5.26 because it is not to be built
...
 * Note that PPA builds skip the mangling steps thus the package needs to be built in sbuild/pbuilder/in the official archive with pkgbinarymangler added as an extra package in case of a local build.
 * The resulting libperl5.2? package can also be analyzed to see changelog.Debian.gz not symlinked to perl-modules-5.2?'s changelog, but to check if the original bug is fixed just install libperl5.26:amd64 and libperl5.26:i386 using multiarch (here we assume the current architecture is amd64):
$ sudo dpkg --add-architecture i386
$ sudo apt update
$ sudo apt install libperl5.26:i386

[Regression Potential]

 * The pkgbinarymangler fix may break the pkgstripfiles script causing FTBFS of unrelated packages or could cause building not stripped packages. The former problem would be caught early, while the latter can be avoided by checking the build logs of a few other packages rebuilt with the fixed pkgbinarymangler package.

[Original Bug Text]

Don't run aplication after upgrade from 14.04

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: libperl5.22 5.22.1-9
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
Date: Sun Apr 24 21:08:20 2016
DpkgTerminalLog:
 Preparing to unpack .../libperl5.22_5.22.1-9_i386.deb ...
 Unpacking libperl5.22:i386 (5.22.1-9) ...
 dpkg: error processing archive /var/cache/apt/archives/libperl5.22_5.22.1-9_i386.deb (--unpack):
  trying to overwrite shared '/usr/share/doc/libperl5.22/changelog.Debian.gz', which is different from other instances of package libperl5.22:i386
DuplicateSignature:
 Unpacking libperl5.22:i386 (5.22.1-9) ...
 dpkg: error processing archive /var/cache/apt/archives/libperl5.22_5.22.1-9_i386.deb (--unpack):
  trying to overwrite shared '/usr/share/doc/libperl5.22/changelog.Debian.gz', which is different from other instances of package libperl5.22:i386
ErrorMessage: trying to overwrite shared '/usr/share/doc/libperl5.22/changelog.Debian.gz', which is different from other instances of package libperl5.22:i386
InstallationDate: Installed on 2016-04-24 (0 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1
 apt 1.2.10ubuntu1
SourcePackage: perl
Title: package libperl5.22 5.22.1-9 failed to install/upgrade: trying to overwrite shared '/usr/share/doc/libperl5.22/changelog.Debian.gz', which is different from other instances of package libperl5.22:i386
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Lazar Marius (lazar-nasaud) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in perl (Ubuntu):
status: New → Confirmed
Changed in perl (Ubuntu):
importance: Undecided → High
Revision history for this message
Reuben Firmin (reubenf) wrote :

Workaround, if anybody is blocked by this:

sudo rm /usr/share/doc/libperl5.22/changelog.Debian.gz
sudo apt-get install -f

Revision history for this message
Stéphane Charette (stephanecharette) wrote :

Just ran into this exact problem today in 16.10, so problem still exists. Thanks, Reuben, your workaround in comment #3 got me back up and running again.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Looks like a multi-arch issue. Do you have both libperl5.22:i386 and libperl5.22:amd64 installed at the same time? The packages seem to conflict, though...

Revision history for this message
Rolf Leggewie (r0lf) wrote :

google only finds a bunch of bug reports for "failed to install/upgrade: trying to overwrite shared" but no explanation.

bug 1533780
bug 1574351
bug 1279192
bug 1490282
bug 1290155
bug 1464735
bug 1471677
bug 1193243

Could be an issue of a missing "Replaces"-declaration somewhere. Possibly related to multiarch, too. https://bugs.launchpad.net/ubuntu/+source/icedtea-web/+bug/1471677/comments/3 strongly suggests this.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Based on duplicates, the same issue affects 16.10.

tags: added: yakkety
tags: added: zesty
Revision history for this message
Ola Persson (smurfen) wrote :

I eventually solved this by first deleting /usr/share/doc/libperl5.22/changelog.Debian.gz and then running sudo apt --fix-broken install. This fixed the libperl-issue, however I still had problems scanning. That seemed to be an issue with changed user-permissions during the upgrade to 17.04. simple-scan worked using sudo and after adding my user-account to the groups saned, scanner and lp scanning worked again as expected without using sudo, even after reboot.

Revision history for this message
Ronald Wopereis (woepwoep) wrote :

@Reuben your solution worked for me thx.

Issue arised when simplescan said you need to update your drivers,
and when i did it failed.

Thx Ron

tags: added: artful
removed: yakkety
tags: added: bionic
removed: zesty
Revision history for this message
David Schalk (pyschalk) wrote :

Thank you Ola Persson (smurfen). Your solution worked for me too.

Revision history for this message
jof (jof-v) wrote :

I can confirm this is still an issue in the latest Xenial LTS installations.

This seems to primarily be an issue with multiarch installations.
This prevents many i386 packages from being installed on modern amd64 LTS systems.

This is a high priority bug affecting many users and has been open for nearly 2 years.
Is there any way to get this some attention?

Revision history for this message
Cedders (cedric-gn) wrote :

Confirming this is a problem with multiarch in this direction, and the workaround still works:

$ dpkg --print-architecture
i386
$ dpkg --print-foreign-architectures
amd64

Revision history for this message
webservant (doulos) wrote :

I had this problem this past week, I believe:

From /var/log/apt/term.log

Log started: 2018-06-15 08:39:35
(Reading database ... 397994 files and directories currently installed.)
Preparing to unpack .../libperl5.22_5.22.1-9ubuntu0.5_amd64.deb ...
Unpacking libperl5.22:amd64 (5.22.1-9ubuntu0.5) over (5.22.1-9ubuntu0.3) ...
dpkg: error processing archive /var/cache/apt/archives/libperl5.22_5.22.1-9ubuntu0.5_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libperl5.22/changelog.Debian.gz', which is different from other instances of package libperl5.22:amd64
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libperl5.22_5.22.1-9ubuntu0.5_amd64.deb
Log ended: 2018-06-15 08:39:37

doug@luther:~$ dpkg --print-architecture
amd64

doug@luther:~$ dpkg --print-foreign-architectures
i386

tags: added: rls-bb-incoming
Revision history for this message
Steve Langasek (vorlon) wrote :

changelog is not being handled reproducibly, therefore does not match between architectures for a multiarch install.

In libperl5.26:amd64, changelog.Debian.gz is a real file. in libperl5.26:i386, it's a symlink to ../perl-modules-5.26/changelog.Debian.gz.

Changed in perl (Ubuntu):
status: Confirmed → Triaged
tags: added: id-5b2bdda1b1a060708081efe3
tags: added: cosmic
Balint Reczey (rbalint)
Changed in perl (Ubuntu):
assignee: nobody → Balint Reczey (rbalint)
Revision history for this message
Balint Reczey (rbalint) wrote :

From https://launchpadlibrarian.net/373866990/buildlog_ubuntu-cosmic-i386.perl_5.26.2-6_BUILDING.txt.gz :
...
WARNING: pkgstripfiles: no lock file name available (libperl5.26)
grep: ../perl-modules-5.26/DEBIAN/control: No such file or directory
Searching for duplicated docs in dependency perl-modules-5.26...
  symlinking changelog.Debian.gz in libperl5.26 to file in perl-modules-5.26
WARNING: pkgstripfiles: no lock file name available (libperl5.26)
pkgstripfiles: Running PNG optimiza
...

When not building arch: all just arch: any pkgstripfiles incorrectly creates the symlinks.

I'm testing the fix which I plan upload shortly.

affects: perl (Ubuntu) → pkgbinarymangler (Ubuntu)
Changed in pkgbinarymangler (Ubuntu):
assignee: Balint Reczey (rbalint) → nobody
assignee: nobody → Balint Reczey (rbalint)
status: Triaged → In Progress
Revision history for this message
Balint Reczey (rbalint) wrote :

I plan uploading the attached fix on Monday.

Fixed build's log:
...
pkgstripfiles: processing control file: debian/build/libperl5.26/DEBIAN/control, package libperl5.26, directory debi
an/build/libperl5.26
Skipping perl-modules-5.26 because it is not to be built
pkgstripfiles: Truncating usr/share/doc/libperl5.26/changelog.Debian.gz to topmost ten records
pkgstripfiles: Running PNG optimization (using 4 cpus) for package libperl5.26 ...
pkgstripfiles: No PNG files.
...

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pkgbinarymangler - 140

---------------
pkgbinarymangler (140) cosmic; urgency=medium

  * pkgstripfiles: Skip symlinking identical documentation to not built
    packages, otherwise arch: any only builds may create symlinks which are
    not created when building arch: all and arch: any together. The mismatch
    between the symlinked and not symlinked files causes failure when trying
    to coinstall arch:any packages using multiarch.
    (LP: #1574351)

 -- Balint Reczey <email address hidden> Fri, 13 Jul 2018 21:54:23 +0200

Changed in pkgbinarymangler (Ubuntu):
status: In Progress → Fix Released
Balint Reczey (rbalint)
description: updated
Revision history for this message
Balint Reczey (rbalint) wrote :

I used the attached script for finding affected packages which found the following symlink - not symlink mismatches in Bionic main:
Mismatching doc(s) in files: ./pool/main/g/gpm/libgpm-dev_1.20.7-5_i386.deb ./pool/main/g/gpm/libgpm-dev_1.20.7-5_amd64.deb ./usr/share/doc/libgpm-dev/changelog.Debian.gz 3295 0
Mismatching doc(s) in files: ./pool/main/l/linux/linux-modules-extra-4.15.0-20-generic_4.15.0-20.21_i386.deb ./pool/main/l/linux/linux-modules-extra-4.15.0-20-generic_4.15.0-20.21_amd64.deb ./usr/share/doc/linux-modules-extra-4.15.0-20-generic/changelog.Debian.gz 0 55079
Mismatching doc(s) in files: ./pool/main/l/linux/linux-modules-extra-4.15.0-22-generic_4.15.0-22.24_i386.deb ./pool/main/l/linux/linux-modules-extra-4.15.0-22-generic_4.15.0-22.24_amd64.deb ./usr/share/doc/linux-modules-extra-4.15.0-22-generic/changelog.Debian.gz 0 41296
Mismatching doc(s) in files: ./pool/main/l/linux/linux-modules-extra-4.15.0-23-generic_4.15.0-23.25_i386.deb ./pool/main/l/linux/linux-modules-extra-4.15.0-23-generic_4.15.0-23.25_amd64.deb ./usr/share/doc/linux-modules-extra-4.15.0-23-generic/changelog.Debian.gz 0 34363
Mismatching doc(s) in files: ./pool/main/l/linux/linux-modules-extra-4.15.0-24-generic_4.15.0-24.26_i386.deb ./pool/main/l/linux/linux-modules-extra-4.15.0-24-generic_4.15.0-24.26_amd64.deb ./usr/share/doc/linux-modules-extra-4.15.0-24-generic/changelog.Debian.gz 0 37489
Mismatching doc(s) in files: ./pool/main/l/linux/linux-modules-extra-4.15.0-28-generic_4.15.0-28.30_i386.deb ./pool/main/l/linux/linux-modules-extra-4.15.0-28-generic_4.15.0-28.30_amd64.deb ./usr/share/doc/linux-modules-extra-4.15.0-28-generic/changelog.Debian.gz 0 25563
Mismatching doc(s) in files: ./pool/main/o/openipmi/libopenipmi-dev_2.0.22-1.1ubuntu2_i386.deb ./pool/main/o/openipmi/libopenipmi-dev_2.0.22-1.1ubuntu2_amd64.deb ./usr/share/doc/libopenipmi-dev/changelog.Debian.gz 1902 0
Mismatching doc(s) in files: ./pool/main/p/perl/libperl5.26_5.26.1-6ubuntu0.1_i386.deb ./pool/main/p/perl/libperl5.26_5.26.1-6ubuntu0.1_amd64.deb ./usr/share/doc/libperl5.26/changelog.Debian.gz 0 1859

From those the linux packages and perl seems to be caused by this particular bug, the others are caused by LP: #1782094.

Linux packages are less interesting from multiarch perspective and they are updated frequently thus rebuilding them is not necessary.
I suggest rebuilding perl with the fixed pkgbinarymangler.

Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Lazar, or anyone else affected,

Accepted pkgbinarymangler into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pkgbinarymangler/138.18.04.0 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in pkgbinarymangler (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Balint Reczey (rbalint) wrote :

I verified pkgbinarymangler/138.18.04.0 by rebuilding perl for i386.
perl_i386.build:
...
Unpacking linux-libc-dev:i386 (4.15.0-29.31) over (4.15.0-15.16) ...
Preparing to unpack .../8-pkgbinarymangler_138.18.04.0_all.deb ...
Unpacking pkgbinarymangler (138.18.04.0) over (138) ...
Setting up libapt-inst2.0:i386 (1.6.3) ...
Setting up pkgbinarymangler (138.18.04.0) ...
Setting up libpng16-16:i386 (1.6.34-1ubuntu0.18.04.1) ...
Setting up apt-utils (1.6.3) ...
...
pkgstripfiles: processing control file: debian/build/libperl5.26/DEBIAN/control, package libperl5.26, directory debi
an/build/libperl5.26
WARNING: pkgstripfiles: no lock file name available (libperl5.26)
Skipping perl-modules-5.26 because it is not to be built
pkgstripfiles: Truncating usr/share/doc/libperl5.26/changelog.Debian.gz to topmost ten records
...

$ dpkg-deb -c libperl5.26_5.26.1-6ubuntu0.1_i386.deb | grep changelog
-rw-r--r-- root/root 1859 2018-06-12 19:32 ./usr/share/doc/libperl5.26/changelog.Debian.gz

Balint Reczey (rbalint)
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Lazar, or anyone else affected,

Accepted perl into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/perl/5.26.1-6ubuntu0.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in perl (Ubuntu Bionic):
status: New → Fix Committed
Revision history for this message
Balint Reczey (rbalint) wrote :
Download full text (5.5 KiB)

I verified multiarch constallation of libperl binary packages with 5.26.1-6ubuntu0.2:

root@bb-perl-multiarch:~# apt install libperl5.26 libperl5.26:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  gcc-8-base:i386 libbz2-1.0:i386 libc6:i386 libdb5.3:i386 libgcc1:i386
  libgdbm-compat4:i386 libgdbm5:i386 perl perl-base perl-modules-5.26
  zlib1g:i386
Suggested packages:
  glibc-doc:i386 locales:i386 gdbm-l10n:i386 perl-doc
  libterm-readline-gnu-perl | libterm-readline-perl-perl make
The following NEW packages will be installed:
  gcc-8-base:i386 libbz2-1.0:i386 libc6:i386 libdb5.3:i386 libgcc1:i386
  libgdbm-compat4:i386 libgdbm5:i386 libperl5.26:i386 zlib1g:i386
The following packages will be upgraded:
  libperl5.26 perl perl-base perl-modules-5.26
4 upgraded, 9 newly installed, 0 to remove and 15 not upgraded.
Need to get 14.5 MB of archives.
After this operation, 29.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 libperl5.26 amd64 5.26.1-6ubuntu0.2 [3531 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 perl amd64 5.26.1-6ubuntu0.2 [201 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 perl-base amd64 5.26.1-6ubuntu0.2 [1390 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 perl-modules-5.26 all 5.26.1-6ubuntu0.2 [2762 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/main i386 gcc-8-base i386 8-20180414-1ubuntu2 [18.2 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/main i386 libgcc1 i386 1:8-20180414-1ubuntu2 [48.1 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/main i386 libc6 i386 2.27-3ubuntu1 [2551 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/main i386 libbz2-1.0 i386 1.0.6-8.1 [31.0 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/main i386 libdb5.3 i386 5.3.28-13.1ubuntu1 [738 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/main i386 zlib1g i386 1:1.2.11.dfsg-0ubuntu2 [58.2 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/main i386 libgdbm5 i386 1.14.1-6 [29.9 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic/main i386 libgdbm-compat4 i386 1.14.1-6 [6660 B]
Get:13 http://archive.ubuntu.com/ubuntu bionic-proposed/main i386 libperl5.26 i386 5.26.1-6ubuntu0.2 [3183 kB]
Fetched 14.5 MB in 3s (4493 kB/s)
Preconfiguring packages ...
(Reading database ... 28485 files and directories currently installed.)
Preparing to unpack .../libperl5.26_5.26.1-6ubuntu0.2_amd64.deb ...
Unpacking libperl5.26:amd64 (5.26.1-6ubuntu0.2) over (5.26.1-6ubuntu0.1) ...
Preparing to unpack .../perl_5.26.1-6ubuntu0.2_amd64.deb ...
Unpacking perl (5.26.1-6ubuntu0.2) over (5.26.1-6ubuntu0.1) ...
Preparing to unpack .../perl-base_5.26.1-6ubuntu0.2_amd64.deb ...
Unpacking perl-base (5.26.1-6ubuntu0.2) over (5.26.1-6ubuntu0.1) ...
Setting up perl-base (5.26.1-6ubuntu0.2) ...
(Reading database ... 28485 files and directories currently installed.)
Preparing to un...

Read more...

tags: added: verification-dome verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in perl (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package perl - 5.26.1-6ubuntu0.2

---------------
perl (5.26.1-6ubuntu0.2) bionic; urgency=high

  * No change rebuild to fix LP: #1574351

 -- Balint Reczey <email address hidden> Wed, 18 Jul 2018 16:21:03 +0200

Changed in perl (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of the Stable Release Update for perl has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pkgbinarymangler - 138.18.04.0

---------------
pkgbinarymangler (138.18.04.0) bionic; urgency=medium

  * pkgstripfiles: Serialize PNG optimization and changelog trucation using
    the lock already used for serializing creating symlinks for identical
    documentation files. (LP: #1782094)
  * pkgstripfiles: Skip symlinking identical documentation to not built
    packages, otherwise arch: any only builds may create symlinks which are
    not created when building arch: all and arch: any together. The mismatch
    between the symlinked and not symlinked files causes failure when trying
    to coinstall arch:any packages using multiarch.
    (LP: #1574351)

 -- Balint Reczey <email address hidden> Tue, 17 Jul 2018 16:23:13 +0200

Changed in pkgbinarymangler (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

The perl version in the cosmic release pocket was built after the changes to pkgbinarymangler so this is fixed for cosmic and later releases.

Changed in perl (Ubuntu):
status: Confirmed → Fix Released
tags: added: verification-done
removed: rls-bb-incoming verification-dome
To post a comment you must log in.