file conflict when installing libsgutils-2-1.46-2 when upgrading from lunar to mantic
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sg3-utils (Ubuntu) |
Fix Released
|
Undecided
|
Andreas Hasenack | ||
Mantic |
Fix Released
|
Undecided
|
Andreas Hasenack | ||
Noble |
Fix Released
|
Undecided
|
Andreas Hasenack |
Bug Description
[ Impact ]
A release upgrade from lunar to mantic, or jammy to mantic when lunar goes EOL, will encounter a file conflict in the libgsutils2 library.
This is what the library package is named, and the library it ships, in each relevant ubuntu release:
Jammy: 1.46-1build1
package: libsgutils2-2
ships: libsgutils2-
Lunar: 1.46-1ubuntu0.
package: libsgutils2-2
ships: libsgutils2-
Mantic and Noble: 1.46-3ubuntu2
package: libsgutils2-1.46-2
ships: libsgutils2-
The problem is that in the jammy and lunar versions the file that libgsutils2-2 ships conflicts with mantic, where the package was renamed to libgsutils2-1.46-2.
This update corrects the version of the existing breaks/replaces in the mantic package to avoid this conflict.
Note that, if the upgrade is done with do-release-upgrade, the conflict does not cause an abort, because dpkg is called with --force (see comment #3 down below).
[ Test Plan ]
Perform a release upgrade from lunar to mantic, with mantic-proposed enabled (I'm not yet sure how to have mantic-proposed enabled for do-release-upgrade: I'll come back to this once the package is in proposed).
UPDATE: instructions on how to test with the package in mantic-proposed
a) create /etc/apt/
deb http://
b) create /etc/apt/
Package: libsgutils2-1.46-2 sg3-utils sg3-utils-udev libsgutils2-dev
Pin: release a=mantic-proposed
Pin-Priority: 500
c) Run:
sudo do-release-upgrade
Check the upgrade logs in /var/log/
For example, this shows the problem:
Preparing to unpack .../125-
Unpacking libsgutils2-
dpkg: warning: overriding problem because --force enabled:^M
dpkg: warning: trying to overwrite '/usr/lib/
dpkg: warning: overriding problem because --force enabled:^M
dpkg: warning: trying to overwrite '/usr/lib/
This grep command can also be used:
$ grep "trying to overwrite" /var/log/
dpkg: warning: trying to overwrite '/usr/lib/
dpkg: warning: trying to overwrite '/usr/lib/
With the fixed version, there will be no such dpkg warning when unpacking libsgutils2 (example with a PPA, since the package is not yet in proposed, but the file to check, and grep command, are the same):
$ grep "trying to overwrite" /var/log/
$ # empty result, no hits
Locating the unpacking section in that log, we see that the conflicting package is removed before (took the example from a ppa build):
Removing libsgutils2-2:amd64 (1.46-1ubuntu0.
Selecting previously unselected package libsgutils2-
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading databas
Preparing to unpack .../libsgutils2
Unpacking libsgutils2-
[ Where problems could occur ]
Should this package ever get a version bump in an SRU, then the breaks/replaces version might need a bump, which can easily be forgotten. Something similar happened to a samba security update[1] a while ago. Looking at the history of sg3-utils in SRUs, however, shows that such a bump was never done, so it's unlikely. But if it happens, then this bug will resurface.
1. https:/
[ Other Info ]
N/A
[Original Description]
While upgrading from lunar to mantic dpkg aborted with this error:
```
Preparing to unpack .../libsgutils2
Unpacking libsgutils2-
dpkg: error processing archive /var/cache/
trying to overwrite '/usr/lib/
```
ProblemType: Bug
DistroRelease: Ubuntu 23.10
Package: libsgutils2-2 1.46-1ubuntu0.
ProcVersionSign
Uname: Linux 6.2.0-33-generic x86_64
NonfreeKernelMo
ApportVersion: 2.27.0-0ubuntu5
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: GNOME
Date: Fri Oct 13 15:29:48 2023
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: sg3-utils
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
mtime.conffile.
Related branches
- git-ubuntu bot: Approve
- Athos Ribeiro (community): Approve
- Canonical Server Core Reviewers: Pending requested
- Canonical Server Reporter: Pending requested
-
Diff: 31 lines (+10/-2)2 files modifieddebian/changelog (+8/-0)
debian/control (+2/-2)
- git-ubuntu bot: Approve
- Athos Ribeiro (community): Approve
- Canonical Server Core Reviewers: Pending requested
- Canonical Server Reporter: Pending requested
-
Diff: 31 lines (+10/-2)2 files modifieddebian/changelog (+8/-0)
debian/control (+2/-2)
tags: | added: server-todo |
Changed in sg3-utils (Ubuntu): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
description: | updated |
description: | updated |
Changed in sg3-utils (Ubuntu Mantic): | |
status: | New → In Progress |
assignee: | nobody → Andreas Hasenack (ahasenack) |
description: | updated |
description: | updated |
I was able to remove the old package and continue the installation this way:
```
dpkg -r libsgutils2-2
apt-get --fix-broken install
apt-get dist-upgrade
```