apt does not configure Pre-Depends: before depending package

Bug #1560797 reported by Dawid Wróbel
718
This bug affects 155 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
High
Unassigned
Trusty
Fix Released
High
Martin Pitt
Wily
Fix Released
High
Nathanael
Xenial
Fix Released
Undecided
Unassigned
ubuntu-release-upgrader (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

Happened during upgrade to 16.04, don't know any more details.

--
SRU INFORMATION
===============
Fix: https://anonscm.debian.org/cgit/apt/apt.git/commit/?id=c75e60eb (applied in Xenial last week)

Test case:
 - Install clean wily amd64 desktop + install libgcrypt20:i386
 - change apt sources to xenial, apt-get dist-upgrade
 - with current apt, upgrade will often fail because systemd expects a configure libgcrypt20, or util-linux expects a configured libudev1 or similar, but these packages aren't configured.
 - with the fixed apt, the upgrade should run smoothly.

Regression potential: Any bug here might potentially break package installation or upgrades completely. That said, the fix is quite obvious and has been in production in xenial for a week. Testing this SRU should include several dist-upgrades as well as some normal package installs in trusty/wily.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: systemd-sysv 225-1ubuntu9.1
Uname: Linux 4.4.5-040405-generic x86_64
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
Date: Tue Mar 22 22:56:03 2016
ErrorMessage: pre-dependency problem - not installing systemd-sysv
InstallationDate: Installed on 2013-04-24 (1064 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130423.1)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1
 apt 1.2.7
SourcePackage: systemd
Title: package systemd-sysv 225-1ubuntu9.1 failed to install/upgrade: pre-dependency problem - not installing systemd-sysv
UpgradeStatus: Upgraded to xenial on 2016-03-23 (0 days ago)

Revision history for this message
Dawid Wróbel (dawidw) 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 systemd (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

dpkg: dependency problems prevent configuration of systemd:
 systemd depends on libgcrypt20 (>= 1.6.1); however:
  Package libgcrypt20:amd64 is not configured yet.

so we need to find out why libgcrypt20 failed to configure. Unfortuantely the DpkgTerminalLog is heavily truncated. This was an upgrade from 15.10 (wily), right?

Can you please look in /var/log/dist-upgrade/ whether there is a more complete term log there?

Revision history for this message
Martin Pitt (pitti) wrote :

What's even more curious is that in 15.10 systemd already depends on libgcrypt20, and 15.10 already has a new enough version, so I don't see an obvious reason why it should disappear during that part of the upgrade.

Changed in systemd (Ubuntu):
status: Confirmed → Incomplete
summary: - package systemd-sysv 225-1ubuntu9.1 failed to install/upgrade: pre-
- dependency problem - not installing systemd-sysv
+ package systemd-sysv 225-1ubuntu9.1 failed to install/upgrade:
+ libgcrypt20 was unconfigured
Revision history for this message
peter swain (swine) wrote : Re: package systemd-sysv 225-1ubuntu9.1 failed to install/upgrade: libgcrypt20 was unconfigured

Seems to be resolved by today's update to systemd-sysv 229-3ubuntu1

Revision history for this message
hackel (hackel) wrote :

I just experienced this same issue. I upgraded from 15.10 to 16.04 last night, so that update apparently didn't resolve it.

Revision history for this message
hackel (hackel) wrote :

See my report #1565363 for details of this still happening with systemd-sysv 229-3ubuntu2. (Sorry for the comment spam.)

Revision history for this message
V字龍(Vdragon) (vdragon) wrote :

> Seems to be resolved by today's update to systemd-sysv 229-3ubuntu1
No, I still encounter this issue on 4/6 and I'm sure all updates are installed.

So the bug still exist.

Revision history for this message
V字龍(Vdragon) (vdragon) wrote :

@Martin
> Can you please look in /var/log/dist-upgrade/ whether there is a more
> complete term log there?
Here's your log.

Changed in systemd (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
V字龍(Vdragon) (vdragon) wrote :

```
(Reading database ... 100%^M(Reading database ... 692766 f
iles and directories currently installed.)
Preparing to unpack .../libgcrypt20_1.6.5-2_amd64.deb ...
De-configuring libgcrypt20:i386 (1.6.3-2ubuntu1.1) ...
Unpacking libgcrypt20:amd64 (1.6.5-2) over (1.6.3-2ubuntu1.1) ...
Preparing to unpack .../libgcrypt20_1.6.5-2_i386.deb ...
Unpacking libgcrypt20:i386 (1.6.5-2) over (1.6.3-2ubuntu1.1) ...

(...)

Unpacking cgmanager (0.39-2ubuntu5) over (0.39-2ubuntu2) ...
Processing triggers for man-db (2.7.4-1) ...
dpkg: dependency problems prevent configuration of systemd:
 systemd depends on libgcrypt20 (>= 1.6.1); however:
  Package libgcrypt20:amd64 is not configured yet.
```

libgcrypt2 is unpacked by it's newer version, but isn't configured before systemd's configuration

That's all I can tell as I'm not familiar with APT.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks, it's good to finally have a complete log here. I don't understand why apt fails on that error instead of simply configuring the new libgcrypt20 first -- libgcrypt20 has no circular dependencies with systemd, it only depends on libgpg-error0 and libc6, and both are configured before. And then, after unpacking libgcrypt20, when it would be time to actually configure it, it instead tries to configure systemd.

This is an useful command to reduce the log to the interesting bits: egrep 'libgcrypt20|libgpg-error|libc6|systemd' /tmp/apt-term.log

This sounds like a bug in apt to me, thus adding a task.

Revision history for this message
Martin Pitt (pitti) wrote :

This report and all duplicates use :amd64 and :i386 packages at the same time. I tried to reproduce this again with

  dpkg --add-architecture i386
  apt update
  apt install libgcrypt20:i386 libcap2:i386
  # switch apt sources to xenial
  apt-get dist-upgrade

but this still works fine for me, so I'm still unable to reproduce this (I tried in a VM and a schroot)

Changed in systemd (Ubuntu):
importance: Undecided → High
Changed in apt (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
wgroiss (wolfgang-groiss-gmx) wrote :

It seem's, i have the problem on 2 Notebooks with Update from 15.10 => 16.04:
1st HP Elitebook with xubuntu, 2nd Dell Latitude with Ubuntu.
Maybe other logs are useful? F.e. my apt-term.log from the Dell-Nb.: /var/log/dist-upgrade/apt-term.log. See attachm.

Revision history for this message
David Kalnischkies (donkult) wrote :

As pitti can't reproduce it with a clean system there is a good chance an "unrelated" package from a PPA or cruft from an earlier upgrade confuses apt (as far as I remember PPAs are disabled on upgrade in Ubuntu, so it can't be new "unrelated" packages at least). These bugs are everyone’s favorite and log-staring usually doesn't work that well, so being able to reproduce this would be very nice…

What we can try is testing with the /var/lib/dpkg/status file from BEFORE the upgrade. Backups of this file can be found in /var/backups: The file "dpkg.status.X.gz" (where X is a number and .gz optional if X is 0) modified last before the upgrade would be good to have. Note before uploading: This file includes information about ALL packages you have (or in that case had) installed and in which version (which you might or might not consider private/personal information, but that applies already to most log files, too).

Assuming we would have such a file we could try on a THROWAWAY system: -o dir::state::status=/path/to/file -o Debug::pkgAcqArchive::NoQueue=1 -o Debug::pkgDpkgPM=1
(theoretically its possible to run this on a system you wanna keep, but theoretically there is also no problem with juggling a bunch of running chainsaws… until something goes wrong in practice)
The output will likely be a mile long including the exact commands apt would have used to call dpkg. If that exposes the wrong order we are "good".

Revision history for this message
wgroiss (wolfgang-groiss-gmx) wrote :

OK, here ist my "dpkg.status.X.gz", which is the last one befor update (Update was at 2016.04.08; last day, where Ubuntu was started before, was the date of the log-file 2016.04.05).

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

Hi,
I've disabled and also downgraded most 3rd-party repo packages by using APT Pinning before upgrading Ubuntu and have recorded an 4.5 hour long screencast while I doing this and the entire upgrade, please refer to the video:
https://www.youtube.com/watch?v=yzK7uEybliQ

The dpkg.status backup that is before the upgrade is attached.

Revision history for this message
V字龍(Vdragon) (vdragon) wrote :

The system that I've used is based on my os distro project "Taiwan Community Customized Unofficial Ubuntu Operating System" which is based on Ubuntu trusty and is downloadable from https://github.com/Ubuntu-Taiwan-Community/Ubuntu-TW-Ubuntu/releases/tag/v0.3.0-release201510120351 , I've used this system to sequentially upgraded to 15.10 and after that, 16.04.

I'm currently trying to repeat the same process on a VM and try to reproduce the same issue. Let's try to fix this bug before the xenial official release

Revision history for this message
V字龍(Vdragon) (vdragon) wrote :

Sorry, please entirely ignore #17 as I wrongly recognize my system as upgraded from trusty, but in fact it is a wily clean install instead.

Revision history for this message
David Kalnischkies (donkult) wrote :

Thank you both for the files! A quick test suggests that both expose the problem by unpacking but not configuring libgcrypt before touching systemd. The actual produced order is quiet different through (and both systems are obviously far away from a minbase chroot – which happily does the right thing™). I might have some free time later this week to look at this closer if nobody else beats me to it… (no promise through).

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

I noticed that there's a /var/log/dist-upgrade/apt-clone_system_state.tar.gz which seems to have most (if not all) APT state before upgrading, maybe someone can reconstruct an similar system to test on?

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote : Re: package systemd-sysv 225-1ubuntu9.1 failed to install/upgrade: libgcrypt20 was unconfigured during 15.04 to 16.04 upgrade

Copy from a duplicate bug report...

```
Winfried PLappert (winfried-plappert) wrote 3 hours ago: #4

I have done some more testing:
1.) I removed all the i386 packages, used for skype and google-earth and did a 'do-release-upgrade -d' -- and it worked.
2.) I rerun the 'do-release-upgrade -d' with the i386 packages still installed and it failed. with systemd being affected.
```

summary: package systemd-sysv 225-1ubuntu9.1 failed to install/upgrade:
- libgcrypt20 was unconfigured
+ libgcrypt20 was unconfigured during 15.04 to 16.04 upgrade
Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

I will attach /var/log/dist-upgrade/screenlog.0. It shows that only libgcrypt20:i386 is deconfigured (line 1448), but apt breaks later.

Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

I just confirmed: clean am64 system + installation of libgcrypt20:i386 (plus dependencies) breaks the upgrade.

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote : Re: package systemd-sysv 225-1ubuntu9.1 failed to install/upgrade: libgcrypt20 was unconfigured during 15.10 to 16.04 upgrade

Oops, I made wrong new title, fixed.

Now we finally have a way to reproduce the bug!

summary: package systemd-sysv 225-1ubuntu9.1 failed to install/upgrade:
- libgcrypt20 was unconfigured during 15.04 to 16.04 upgrade
+ libgcrypt20 was unconfigured during 15.10 to 16.04 upgrade
Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

1.) fresh install of ubuntu-mate 1510 in a VirtualBox environment
2.) sudo apt-get update && sudo apt-get dist-upgrade # --to get latest kernel etc ...
3.) sudo apt-get install libgcrypt20:i386 # -- force installation of libgcrypt20:i386
4.) sudo do-relase-upgrade -d

Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

5.) bang, see attached /var/log/dist-upgrade/apt-term.log

...
dpkg: dependency problems prevent configuration of systemd:^M
 systemd depends on libgcrypt20 (>= 1.6.1); however:^M
  Package libgcrypt20:amd64 is not configured yet.^M
^M
dpkg: error processing package systemd (--configure):^M
 dependency problems - leaving unconfigured^M
Errors were encountered while processing:^M
 systemd^M

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

Why would amd64 arch. systemd depends on i386 arch. libgcrypt20?

Anyway thanks for testing, I'll try to reproduce it as well.

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

I've confirmed Winfried's reproduce steps on a Ubuntu 15.10 clean install VM.

Revision history for this message
Martin Pitt (pitti) wrote :

I just marked bug 1569099 as a duplicate, although it happens for a different package (libudev1:i386 and util-linux) the root cause in apt looks fairly identical.

Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

I compared an update of a 1510-amd64 only system - the one from above (ubuntu-mate-15.10-desktop-amd64.iso) with a the same system, added the libgcrypt20:i386 packages.

1.) There is hardly any de-configuring going in the "pure" amd64 system, only (plymouth and ifupdown).
2.) in the amd64 + libgcrypt20:i386 system:
De-configuring plymouth (0.9.0-0ubuntu9) ...
De-configuring ifupdown (0.7.54ubuntu1.3) ..
.
De-configuring libgcc1:i386 (1:5.2.1-22ubuntu2) ...
De-configuring gcc-5-base:amd64 (5.2.1-22ubuntu2) ...
De-configuring libc6:i386 (2.21-0ubuntu4.1) ...
De-configuring libgpg-error0:amd64 (1.19-2) ...
De-configuring libgcrypt20:i386 (1.6.3-2ubuntu1.1) ...

Why is this deconfiguring happening? The deconfiguring is the the apparent reason for the upgrade failure.

Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

What did not happen in amd64 + libgcrypt20:i386 system: the de-configured packages were not set up again "Setting up ...". What triggers the setup to happen?

Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

I have been playing a bit and did a fully manual update to 1604:
1.0) disable any third party packages in /etc/apt/source.list.d/
1.1) in /etc/apt/source.list change "wily" to "xenial" throughout
2.) apt-get update
3.) apt-get install base-file dpkg systemd
4.) apt-get dist-upgrade
5.) and it works!

Revision history for this message
David Kalnischkies (donkult) wrote :

Attached is a trivial patch [in retrospective] I just committed upstream which should fix this issue – I have only verified it by logchecking with the two status files from the buglog (again: thanks!) through, I haven't actually run it on a real system so testers welcome!

That should be easily backportable into 2011 (= the time this regression was introduced) even if the surrounding code changed a bit over time. Could potentially also be worked around with strategic duplication of Pre-Depends in Depends. So, what going on? apt doesn't check if Pre-Depends are satisfied before configuring but that is actually hard to trigger as apt does check them for unpack and the window between unpack and configure is usually very small as apt is actively trying to have it very small (compare immediate configuration) so all my attempts at constructing a testcase for it failed so far…

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-recheck-Pre-Depends-satisfaction-in-SmartConfigure.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

I downloaded the apt source for ubuntu-mate-1510-amd64, modified the two lines in apt_pkg/packagemanager.cc, rebuild the lot according to http://askubuntu.com/questions/81870/how-to-download-modify-build-and-install-a-debian-source-package, and installed it locally on my ubuntu-mate-1510-amd64 system.

I did a check that libgcrypt20:i386 was installed, did a "do-release-upgrade -d" (or the local version of it) and it ran through successfully!

Congratulations to David K. for fixing a 5 year old bug!!

Revision history for this message
Martin Pitt (pitti) wrote :

Wow David, you rock! Thanks muchly!

Also thanks to Winfried for his exemplary testing.

Changed in systemd (Ubuntu):
status: Confirmed → Invalid
Changed in apt (Ubuntu):
status: Confirmed → In Progress
Martin Pitt (pitti)
Changed in apt (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

I think we need to backport this to trusty and wily too, as it's not guaranteed that we get the new apt before the affected packages on upgrade.

no longer affects: systemd (Ubuntu Wily)
no longer affects: systemd (Ubuntu Trusty)
no longer affects: systemd (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 1.2.10ubuntu1

---------------
apt (1.2.10ubuntu1) xenial; urgency=medium

  * Recheck Pre-Depends satisfaction in SmartConfigure, to avoid unconfigured
    Pre-Depends (which dpkg later fails on). Fixes upgrade failures of
    systemd, util-linux, and other packages with Pre-Depends. Many thanks to
    David Kalnischkies for figuring out the patch and Winfried PLappert for
    testing! Patch taken from Debian git. (LP: #1560797)

 -- Martin Pitt <email address hidden> Thu, 14 Apr 2016 09:05:29 +0200

Changed in apt (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
wgroiss (wolfgang-groiss-gmx) wrote :

For me, the bug fixing and the way of working is very impressive!
Thank You all for Your help!

That's the reason, why i like using linux ubuntu!
I hadn't any other problem after upgrading from 15.10 to 16.04!

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

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

Changed in apt (Ubuntu Trusty):
status: New → Confirmed
Changed in apt (Ubuntu Wily):
status: New → Confirmed
Revision history for this message
Paul (i41bktob-launchpad-net) wrote :

Quick fix solution if you hit this on an amd64 system before the patch propagates:

dpkg --purge libcgmanager0:i386 libdbus-1-3:i386 libgcrypt20:i386 libnih-dbus1:i386 libsystemd0:i386

(Don't know why my system had i386 versions of these packages installed, maybe they were automatically installed during the switch to systemd.)

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

```
dpkg --purge libcgmanager0:i386 libdbus-1-3:i386 libgcrypt20:i386 libnih-dbus1:i386 libsystemd0:i386
```
Wouldn't using `apt-get purge` more proper than using `dpkg --purge`?

One week before 14.04 release, it would be great if the patch lands 14.04 and 15.10 soon.

Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

comment to #42: Paul, the installation of the skype package pulls in libgcrypt20:i386 amongst others. And google-earth-stable does the same. See attachments for details.

Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

Sorry, missed the the google earth dependencies

Martin Pitt (pitti)
summary: package systemd-sysv 225-1ubuntu9.1 failed to install/upgrade:
- libgcrypt20 was unconfigured during 15.10 to 16.04 upgrade
+ libgcrypt20 was unconfigured during 15.10 to 16.04 upgrade (apt does not
+ configure Pre-Depends: correctly)
Revision history for this message
Martin Pitt (pitti) wrote :

This still affects upgrades (see last two duplicates) as these use trusty's/wily's apt, so we need to SRU this urgently.

summary: - package systemd-sysv 225-1ubuntu9.1 failed to install/upgrade:
- libgcrypt20 was unconfigured during 15.10 to 16.04 upgrade (apt does not
- configure Pre-Depends: correctly)
+ apt does not configure Pre-Depends: before depending package
Changed in apt (Ubuntu Trusty):
importance: Undecided → High
Changed in apt (Ubuntu Wily):
importance: Undecided → High
Changed in apt (Ubuntu Trusty):
status: Confirmed → In Progress
assignee: nobody → Martin Pitt (pitti)
Changed in apt (Ubuntu Wily):
status: Confirmed → In Progress
assignee: nobody → Martin Pitt (pitti)
Martin Pitt (pitti)
description: updated
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Dawid, or anyone else affected,

Accepted apt into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/1.0.10.2ubuntu2 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 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. 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 apt (Ubuntu Wily):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in apt (Ubuntu Trusty):
status: In Progress → Fix Committed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Dawid, or anyone else affected,

Accepted apt into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/1.0.1ubuntu2.13 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 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. 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!

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1560797

tags: added: iso-testing
Revision history for this message
Brian Murray (brian-murray) wrote :

I installed the version of apt from wily-proposed and then completed an upgrade from Wily to Xenial using that version of apt with the libgcrypt packages installed.

From /var/log/dist-upgrade/apt-term.log we can see the following:

Processing triggers for man-db (2.7.4-1) ...^M
Setting up libgcrypt20:amd64 (1.6.5-2) ...^M
Setting up libgcrypt20:i386 (1.6.5-2) ...^M
Setting up systemd (229-4ubuntu4) ...^M

So I think this is verification-done for Wily.

tags: added: verification-done-wily
Revision history for this message
Brian Murray (brian-murray) wrote :

I installed the version of apt from trusty-proposed and then completed an upgrade from Trusty to Xenial using that version of apt with the libgcrypt packages installed.

From /var/log/dist-upgrade/apt-term.log we can see the following:

Processing triggers for libc-bin (2.19-0ubuntu6.7) ...^M
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database ... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 232996 files and directories currently installed.)^M
Preparing to unpack .../libgcrypt20_1.6.5-2_i386.deb ...^M
Unpacking libgcrypt20:i386 (1.6.5-2) over (1.6.1-2ubuntu1.14.04.1) ...^M
Selecting previously unselected package libgcrypt20:amd64.^M
Preparing to unpack .../libgcrypt20_1.6.5-2_amd64.deb ...^M
Unpacking libgcrypt20:amd64 (1.6.5-2) ...^M
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...^M
Setting up libgcrypt20:amd64 (1.6.5-2) ...^M
Setting up libgcrypt20:i386 (1.6.5-2) ...^M
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...^M
Selecting previously unselected package libsystemd0:amd64.^M
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database ... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 232998 files and directories currently installed.)^M
Preparing to unpack .../libsystemd0_229-4ubuntu4_amd64.deb ...^M
Unpacking libsystemd0:amd64 (229-4ubuntu4) ...^M
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...^M
Setting up libsystemd0:amd64 (229-4ubuntu4) ...^M
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...^M

So that looks good for Trusty too.

tags: added: verification-done-trusty
removed: verification-needed
Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

Did an upgrade to 1604:
1.) modfied /etc/apt/sources.list to include wily-proposed
2.) apt-get update
3.) apt-get install apt which installed apt and libapt-pkg4.16 at version 1.0.10.2ubuntu2
4.) do-release-upgrade -d
5.) success!!

6.) Get apt / libapt-pkg4.16 out in the world tonight or tomorrow!

Revision history for this message
Martin Pitt (pitti) wrote :

I tested the proposed apt with some package installs (not upgrades) that involve lots of dependencies (network-manager), conflicts (upstart-sysv vs. systemd-sysv), and cross-architecture dependencies (ubuntu-emulator:amd64 depends on ubuntu-emulator-runtime:i386). These all work fine.

Given that this breaks upgrades pretty hard and 16.04's release is imminent, I'll expedite the usual 7 day waiting period and release these now.

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

This bug was fixed in the package apt - 1.0.1ubuntu2.13

---------------
apt (1.0.1ubuntu2.13) trusty; urgency=medium

  * Recheck Pre-Depends satisfaction in SmartConfigure, to avoid unconfigured
    Pre-Depends (which dpkg later fails on). Fixes upgrade failures of
    systemd, util-linux, and other packages with Pre-Depends. Many thanks to
    David Kalnischkies for figuring out the patch and Winfried PLappert for
    testing! Patch taken from Debian git. (LP: #1560797)

 -- Martin Pitt <email address hidden> Tue, 19 Apr 2016 12:32:43 +0200

Changed in apt (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Update Released

The verification of the Stable Release Update for apt 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 apt - 1.0.10.2ubuntu2

---------------
apt (1.0.10.2ubuntu2) wily-proposed; urgency=medium

  * Recheck Pre-Depends satisfaction in SmartConfigure, to avoid unconfigured
    Pre-Depends (which dpkg later fails on). Fixes upgrade failures of
    systemd, util-linux, and other packages with Pre-Depends. Many thanks to
    David Kalnischkies for figuring out the patch and Winfried PLappert for
    testing! Patch taken from Debian git. (LP: #1560797)

 -- Martin Pitt <email address hidden> Tue, 19 Apr 2016 12:36:25 +0200

Changed in apt (Ubuntu Wily):
status: Fix Committed → Fix Released
Revision history for this message
Richard Uijen (richarduijen) wrote :

I think I got this bug. I upgraded to 16.04 because my update manager proposed that I do so.
I first had a message that I should choose between lightdm and gdm3. I chose the default: lightdm.
Then systemd failed to install, then (I don't know in what order)
systemd-sysv
lidpam-systemd
gvfs-daemons
gvfs
gvfs-backends
udisk2
nautilus
gvfs-fuse
policy-kit-1
ubuntu-system-service
gnome-settings-daemon
colord
gnome-control-center
gnome-bluetooth
pulseaudio
indicator-sound
unity-control-center

By then, I feared that my installation was lost. I got a zillion more errors.

At the end, I got a message that I might have a none-working system. So, instead of restarting, I did what some internet pages suggested:
run the following in a terminal (and do what seems logical to do):
apt-get -f install
apt-get update
apt-get upgrade
(I think I repeated the series a few times, until no warnings were given anymore and all the work was done)
Then I crossed my fingers and restarted,... and got a welcome screen and could login.
This, however, was followed by some error messages and a dialogue which led me to this page, ultimately.

So, I think my system works (despite all), but I'm not sure.

Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

Richard, you should be okay. I have had very similar problems when I upgraded my virtual systems from wily (1510) to xenial (1604) when there still were in development mode.

Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

Richard, you should be okay. I have had very similar problems when I upgraded my virtual systems from wily (1510) to xenial (1604) when they there still were in development mode. I recovered the upgrade by apt-get -f install, apt-get update, apt-get dist-upgrade (issued a few times).

Revision history for this message
tuhawks (tuhawk) wrote : Re: [Bug 1560797] Re: apt does not configure Pre-Depends: before depending package

Richard and Winfried,

   I thank you both for your input and knowledge. I did basically
:
apt-get autoremove

apt-get update

apt-get install -f

then everything seem to work, for now??? I will wait for the next updates
and see if anything happens.

On Fri, Apr 22, 2016 at 2:16 PM, Winfried PLappert <
<email address hidden>> wrote:

> Richard, you should be okay. I have had very similar problems when I
> upgraded my virtual systems from wily (1510) to xenial (1604) when they
> there still were in development mode. I recovered the upgrade by apt-get
> -f install, apt-get update, apt-get dist-upgrade (issued a few times).
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1573198).
> https://bugs.launchpad.net/bugs/1560797
>
> Title:
> apt does not configure Pre-Depends: before depending package
>
> Status in apt package in Ubuntu:
> Fix Released
> Status in apt source package in Trusty:
> Fix Released
> Status in apt source package in Wily:
> Fix Released
>
> Bug description:
> Happened during upgrade to 16.04, don't know any more details.
>
> --
> SRU INFORMATION
> ===============
> Fix: https://anonscm.debian.org/cgit/apt/apt.git/commit/?id=c75e60eb
> (applied in Xenial last week)
>
> Test case:
> - Install clean wily amd64 desktop + install libgcrypt20:i386
> - change apt sources to xenial, apt-get dist-upgrade
> - with current apt, upgrade will often fail because systemd expects a
> configure libgcrypt20, or util-linux expects a configured libudev1 or
> similar, but these packages aren't configured.
> - with the fixed apt, the upgrade should run smoothly.
>
> Regression potential: Any bug here might potentially break package
> installation or upgrades completely. That said, the fix is quite
> obvious and has been in production in xenial for a week. Testing this
> SRU should include several dist-upgrades as well as some normal
> package installs in trusty/wily.
>
>
> ProblemType: Package
> DistroRelease: Ubuntu 16.04
> Package: systemd-sysv 225-1ubuntu9.1
> Uname: Linux 4.4.5-040405-generic x86_64
> ApportVersion: 2.20-0ubuntu3
> Architecture: amd64
> Date: Tue Mar 22 22:56:03 2016
> ErrorMessage: pre-dependency problem - not installing systemd-sysv
> InstallationDate: Installed on 2013-04-24 (1064 days ago)
> InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64
> (20130423.1)
> RelatedPackageVersions:
> dpkg 1.18.4ubuntu1
> apt 1.2.7
> SourcePackage: systemd
> Title: package systemd-sysv 225-1ubuntu9.1 failed to install/upgrade:
> pre-dependency problem - not installing systemd-sysv
> UpgradeStatus: Upgraded to xenial on 2016-03-23 (0 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1560797/+subscriptions
>

--
That's My Story and I'm Stickin To It!

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

I wonder why this still happens even after the fix is released on 14.04/15.10...

Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

The question is: was the apt package patch applied BEFORE the distribution upgrade? I doubt it, if you use the graphical interface. update-manager does not give you a chance to update first and then do a distribution upgarde.

Revision history for this message
Richard Uijen (richarduijen) wrote :

I don't know, but the update-manager did an update before I got the option to upgrade the distribution. I didn't look into the details.

Revision history for this message
Winfried PLappert (winfried-plappert) wrote :

I better correct my statement at #62. I tested it just now and it is incorrect. Upgrade inside wily (1510) comes first, and then distribution upgrade.

Revision history for this message
Brian Murray (brian-murray) wrote :

If /usr/lib/ubuntu-release-upgrader/check-new-release-gtk is used, which is called by the update-notifier release upgrade notification, the upgrade can start without first upgrading the system (because update-manager is by passed). It is possible to make ubuntu-release-upgrader require certain packages be installed before starting the release upgrade and it seems like we should require the new version of apt.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Dawid, or anyone else affected,

Accepted ubuntu-release-upgrader into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:16.04.14 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 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. 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!

tags: added: verification-needed
Changed in ubuntu-release-upgrader (Ubuntu Xenial):
status: New → Fix Committed
Changed in apt (Ubuntu Xenial):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
Revision history for this message
Matthias Niess (mniess) wrote :

I'm not sure this bug is fixed. I experienced and reported (#1573513) this on April 22nd when this was supposedly already fixed. I'd like to add that I definately upgraded wily before doing the dist-upgrade.

Revision history for this message
Christian Rieffel (eweg) wrote : Re: [Bug 1560797] Re: apt does not configure Pre-Depends: before depending package

Le 26/04/2016 10:51, Martin Pitt a écrit :
> Hello Dawid, or anyone else affected,
>
> Accepted ubuntu-release-upgrader into xenial-proposed. The package will
> build now and be available at https://launchpad.net/ubuntu/+source
> /ubuntu-release-upgrader/1:16.04.14 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 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 to verification-done. If it does not fix the
> bug for you, please add a comment stating that, and change the tag to
> verification-failed. 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!
>
> ** Also affects: ubuntu-release-upgrader (Ubuntu)
> Importance: Undecided
> Status: New
>
> ** Tags added: verification-needed
>
> ** Also affects: apt (Ubuntu Xenial)
> Importance: Undecided
> Status: New
>
> ** Also affects: ubuntu-release-upgrader (Ubuntu Xenial)
> Importance: Undecided
> Status: New
>
> ** Changed in: ubuntu-release-upgrader (Ubuntu Xenial)
> Status: New => Fix Committed
>
> ** Changed in: apt (Ubuntu Xenial)
> Status: New => Fix Released
>
Hello Martin,

Thank you for your message.

[Un]happily the bug 1560797, which seems to be Confirmed now, had for me
no more consequences that a great amount of warning message during
installation. The first reboot after installation was clean, and
everything worked without problem after this.

So I'm afraid I won't be able to re-update from proposed, since my
laptop works with xenial.
I hope other people affected by this bug won't experience more troubles
than me.

Kind regards,
Christian

Revision history for this message
Brian Murray (brian-murray) wrote :

I've tested an upgrade from Wily to Xenial using the version of the ubuntu-release-upgrader from -proposed and with apt version 1.0.10.2ubuntu1 installed, with that version of apt the release upgrade process would not start. Once I installed the newer version of apt, I was able to start the upgrade.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

@Matthias - I have commented on your bug report, it looks like you did not in fact have the fixed version of apt installed.

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

This bug was fixed in the package ubuntu-release-upgrader - 1:16.04.14

---------------
ubuntu-release-upgrader (1:16.04.14) xenial; urgency=medium

  [ Steve Langasek ]
  * No-change rebuild to pick up translations from Launchpad (including the
    Greek translations, which had been accidentally dropped in the previous
    upload due to a collision with the importer).

  [ Brian Murray ]
  * Ensure that the system being upgraded has the version of apt which fixes
    LP: #1560797 installed and that 14.04 systems have the version of dpkg
    which fixes LP: #1574285 installed.

 -- Brian Murray <email address hidden> Mon, 25 Apr 2016 15:01:58 -0700

Changed in ubuntu-release-upgrader (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Ealdwine (eode) wrote :

I am having this issue right now. Before updating, I did:

    sudo apt-get-update
    sudo apt-get dist-upgrade

..and then launched Software Updater.

However, it seems that the newest version of the software updater didn't install for whatever reason. As the install is running, if I do:

    $ apt-cache policy ubuntu-release-upgrader-core
    ubuntu-release-upgrader-core:
      Installed: 1:15.10.14.4
      Candidate: 1:16.04.14
      Version table:
         1:16.04.14 500
            500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
            500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
         1:16.04.12 500
            500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
            500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages
     *** 1:15.10.14.4 100
            100 /var/lib/dpkg/status

..so obviously the software updater somehow escaped getting updated, so I got the version with the bug still.

Revision history for this message
Brian Ealdwine (eode) wrote :

..as a sanity check, it'd probably be a good idea for the upgrader to check and ensure it's running the latest version.

Revision history for this message
Brian Murray (brian-murray) wrote :

@Brian Visel - The way the release upgrader works is that it downloads a tarball of ubuntu-release-upgrader for the release to which you are upgrading. Subsequently, the fix doesn't need to be in the release from which you are upgrading. Additionally, using "apt-get dist-upgrade" bypasses the ubuntu-release-upgrader process altogether and is not a recommended way to upgrade.

https://wiki.ubuntu.com/XenialXerus/ReleaseNotes#Upgrading_from_Ubuntu_14.04_LTS_or_15.10

Martin Pitt (pitti)
Changed in ubuntu-release-upgrader (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:16.10.1

---------------
ubuntu-release-upgrader (1:16.10.1) yakkety; urgency=medium

  * DistUpgrade/{EOL,}ReleaseAnnouncement,
    DistUpgrade/DistUpgrade/window_main.ui,
    data/gtkbuilder/DistUpgrade.ui,
    data/DistUpgrade.cfg,
    pre-build.sh:
    - updated for 16.04 -> 16.10
  * tests/test_country_mirror.py: modify how the LANG environment variable was
    being modified there by fixing a test failure in test_sources_list.py.

 -- Brian Murray <email address hidden> Tue, 03 May 2016 08:54:38 -0700

Changed in ubuntu-release-upgrader (Ubuntu):
status: Invalid → Fix Released
Nathanael (mnathanael26)
Changed in apt (Ubuntu Wily):
assignee: Martin Pitt (pitti) → Nathanael (mnathanael26)
Revision history for this message
PW Dudler (proclean256) wrote :

1.0.1ubuntu2.13.. it does let me upgrade

Changed in apt (Ubuntu):
importance: High → Medium
importance: Medium → High
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.