qemu-system-gui 1:5.1+dfsg-4ubuntu2 fails to upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| qemu (Ubuntu) |
Critical
|
Unassigned |
Bug Description
Hello,
Thank you for maintaining these QEmu packages!
On Ubuntu Hirsute, I am unable to upgrade this package:
$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
qemu-system-gui
1 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
142 not fully installed or removed.
Need to get 0 B/51.5 kB of archives.
After this operation, 8,192 B disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 345606 files and directories currently installed.)
Preparing to unpack .../qemu-
cp: -r not specified; omitting directory '/var/run/
dpkg: warning: old qemu-system-
dpkg: trying script from the new package instead ...
dpkg: error processing archive /var/cache/
there is no script in the new version of the package - giving up
Errors were encountered while processing:
/var/cache/
E: Sub-process /usr/bin/dpkg returned an error code (1)
It looks like the "Debian" dir is created during the upgrade and causes the issue above.
Related branches
- Lucas Kanashiro: Approve on 2021-02-22
- Canonical Server packageset reviewers: Pending requested 2021-02-22
- Canonical Server Team: Pending requested 2021-02-22
-
Diff: 6465 lines (+5793/-30)17 files modifieddebian/changelog (+4288/-4)
debian/control (+88/-17)
debian/control-in (+59/-8)
debian/patches/series (+7/-0)
debian/patches/ubuntu/define-ubuntu-machine-types.patch (+784/-0)
debian/patches/ubuntu/enable-svm-by-default.patch (+34/-0)
debian/patches/ubuntu/lp-1907789-build-no-pie-is-no-functional-liker-flag.patch (+76/-0)
debian/patches/ubuntu/lp-1916230-hw-s390x-fix-build-for-virtio-9p-ccw.patch (+56/-0)
debian/patches/ubuntu/pre-bionic-256k-ipxe-efi-roms.patch (+62/-0)
debian/qemu-kvm-init (+89/-0)
debian/qemu-system-common.install (+1/-0)
debian/qemu-system-common.qemu-kvm.default (+8/-0)
debian/qemu-system-common.qemu-kvm.service (+16/-0)
debian/qemu-system-gui.prerm (+42/-0)
debian/qemu-system-x86.NEWS (+80/-0)
debian/qemu-system-x86.README.Debian (+47/-0)
debian/rules (+56/-1)
- Paride Legovini (community): Approve on 2021-01-06
- Canonical Server Team: Pending requested 2021-01-05
- Ubuntu Server Dev import team: Pending requested 2021-01-05
-
Diff: 6336 lines (+5677/-30)16 files modifieddebian/changelog (+4229/-4)
debian/control (+88/-17)
debian/control-in (+59/-8)
debian/patches/series (+6/-0)
debian/patches/ubuntu/define-ubuntu-machine-types.patch (+784/-0)
debian/patches/ubuntu/enable-svm-by-default.patch (+34/-0)
debian/patches/ubuntu/lp-1907789-build-no-pie-is-no-functional-liker-flag.patch (+76/-0)
debian/patches/ubuntu/pre-bionic-256k-ipxe-efi-roms.patch (+62/-0)
debian/qemu-kvm-init (+89/-0)
debian/qemu-system-common.install (+1/-0)
debian/qemu-system-common.qemu-kvm.default (+8/-0)
debian/qemu-system-common.qemu-kvm.service (+16/-0)
debian/qemu-system-gui.prerm (+42/-0)
debian/qemu-system-x86.NEWS (+80/-0)
debian/qemu-system-x86.README.Debian (+47/-0)
debian/rules (+56/-1)
- Robie Basak: Approve on 2020-12-10
- Canonical Server Team: Pending requested 2020-12-09
- Ubuntu Server Dev import team: Pending requested 2020-12-09
-
Diff: 6221 lines (+5555/-30)15 files modifieddebian/changelog (+4173/-4)
debian/control (+91/-17)
debian/control-in (+62/-8)
debian/patches/series (+5/-0)
debian/patches/ubuntu/define-ubuntu-machine-types.patch (+784/-0)
debian/patches/ubuntu/enable-svm-by-default.patch (+34/-0)
debian/patches/ubuntu/pre-bionic-256k-ipxe-efi-roms.patch (+62/-0)
debian/qemu-kvm-init (+89/-0)
debian/qemu-system-common.install (+1/-0)
debian/qemu-system-common.qemu-kvm.default (+8/-0)
debian/qemu-system-common.qemu-kvm.service (+16/-0)
debian/qemu-system-gui.prerm (+42/-0)
debian/qemu-system-x86.NEWS (+80/-0)
debian/qemu-system-x86.README.Debian (+47/-0)
debian/rules (+61/-1)
Christian Ehrhardt (paelzer) wrote : | #1 |
Matthieu Baerts (matttbe) wrote : | #2 |
Hi Christian,
Thank you for the prompt answer. I thought it was different from bug 1905377 because the last version was supposed to fix the same issue.
Note that I already tried the work around you provided but it doesn't help:
$ sudo rm -r /var/run/
E: Sub-process /usr/bin/dpkg returned an error code (1)
Result: 100
Same if I remove "/var/run/qemu"
$ sudo rm -r /var/run/qemu/; sudo apt-get dist-upgrade -y >/dev/null; echo "Result: $?"
E: Sub-process /usr/bin/dpkg returned an error code (1)
Result: 100
Is it just because I have 1:5.1+dfsg-
Christian Ehrhardt (paelzer) wrote : | #3 |
Interesting - taking the dup away until we found what is different for you then.
Christian Ehrhardt (paelzer) wrote : | #4 |
Could you report me a "ls -laF /var/run/qemu/" what else might be the issue there?
I mean you even removed it so ... ?!
The failing script should be
/var/lib/
Could you replace the "set -e" with "set -ex" there please and report back all the output your upgrade generates?
And finally to keep output down a bit, don't do "sudo apt-get dist-upgrade -y" but maybe "sudo apt install qemu-system-gui -y"
Eager to hear back to see what other issue is hidden in there.
P.S. And thanks for testing the current -dev release even if this time this bite you (and probably everyone else).
Changed in qemu (Ubuntu): | |
status: | New → Incomplete |
Matthieu Baerts (matttbe) wrote : | #5 |
> Could you report me a "ls -laF /var/run/qemu/" what else might be the issue there?
Sure:
% ls -laF /var/run/qemu/
total 0
drwxr-xr-x 3 root root 60 Nov 30 11:43 ./
drwxr-xr-x 42 root root 1120 Nov 30 11:43 ../
drwxr-xr-x 2 root root 40 Nov 30 11:43 Debian/
> I mean you even removed it so ... ?!
Yes, it is created with the upgrade. I had to reboot for other reasons and this directory was not even there before I tried the upgrade.
> Could you replace the "set -e" with "set -ex" there please and report back all the output your upgrade generates?
% sudo apt install qemu-system-gui -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
qemu-system-gui
1 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
142 not fully installed or removed.
Need to get 0 B/51.5 kB of archives.
After this operation, 8,192 B disk space will be freed.
(Reading database ... 345606 files and directories currently installed.)
Preparing to unpack .../qemu-
+ mkdir -p /var/run/
+ cp /usr/lib/
buntu1/
cp: -r not specified; omitting directory '/var/run/
dpkg: warning: old qemu-system-
eturned error exit status 1
dpkg: trying script from the new package instead ...
dpkg: error processing archive /var/cache/
fsg-4ubuntu2_
there is no script in the new version of the package - giving up
Errors were encountered while processing:
/var/cache/
E: Sub-process /usr/bin/dpkg returned an error code (1)
When looking at the output and the recent modifications you did in the package, it looks like I have the issue just because I have 1:5.1+dfsg-4ubuntu1 version installed and I can safely force the upgrade, right?
> P.S. And thanks for testing the current -dev release even if this time this bite you (and probably everyone else).
My pleasure! I cannot help more with the packaging, etc. in Ubuntu like I did before but I try to report bugs with the -dev release I use for years now :)
Christian Ehrhardt (paelzer) wrote : | #6 |
Thanks for the data Matthieu!
Hmm, that is indeed the "old & broken" style that should be (and is for qemu-block-extra) fixed in 5.1+dfsg-4ubuntu2.
...
Packaging:
- d/qemu-
Binary Package:
$ apt install qemu-system-gui
$ dpkg -l qemu-system-gui
ii qemu-system-
root@h:~# ll /var/lib/
-rw-r--r-- 1 root root 396 Nov 30 11:33 /var/lib/
-rw-r--r-- 1 root root 463 Nov 24 10:16 /var/lib/
=> no maintainer scripts anymore (as intended)
So - as with the former issue - what is failing is the old packages prerm of 1:5.1+dfsg-
I found in a discussion (thanks Juliank) why this isn't an issue with qemu-block-extra (which is what this was first found and fixed for) and can resolve it in a coming update.
Changed in qemu (Ubuntu): | |
status: | Incomplete → Triaged |
Christian Ehrhardt (paelzer) wrote : | #7 |
Summary:
of [1] "upgrading" we can not prevent "1.2-3->prerm upgrade 1.2-4" to fail.
But we can make the fallback of "1.2-4-prerm failed-upgrade 1.2-3" working (which it already is for qemu-block-extra).
We essentially need a rather empty "prerm" in hirsute that can be dropped in the next release as it is only covering that issue in the initial 1:5.1+dfsg-
... working on it
Changed in qemu (Ubuntu): | |
status: | Triaged → In Progress |
Changed in qemu (Ubuntu): | |
importance: | Undecided → Critical |
Christian Ehrhardt (paelzer) wrote : | #8 |
Test:
# install current version - will be >=1:5.1+
$ apt install qemu-system-gui
# get old broken version and install it
$ wget https:/
$ dpkg --force-all -i qemu-system-
# trigger the bug
$ apt install qemu-system-gui
...
Preparing to unpack .../qemu-
cp: -r not specified; omitting directory '/var/run/
dpkg: warning: old qemu-system-
dpkg: trying script from the new package instead ...
dpkg: error processing archive /var/cache/
there is no script in the new version of the package - giving up
Errors were encountered while processing:
/var/cache/
E: Sub-process /usr/bin/dpkg returned an error code (1)
A fixed version builds in [1] and will be tested before uploading the fix (no other changes than for this bug in this)
[1]: https:/
Matthieu Baerts (matttbe) wrote : | #9 |
Hi Christian,
Thank you for the fix!
$ wget https:/
$ sudo dpkg -i qemu-system-
(Reading database ... 345606 files and directories currently installed.)
Preparing to unpack qemu-system-
+ mkdir -p /var/run/
+ cp /usr/lib/
cp: -r not specified; omitting directory '/var/run/
dpkg: warning: old qemu-system-
dpkg: trying script from the new package instead ...
dpkg: ... it looks like that went OK
Unpacking qemu-system-
It's working well!
Christian Ehrhardt (paelzer) wrote : | #10 |
Fix works:
Preparing to unpack .../qemu-
cp: -r not specified; omitting directory '/var/run/
dpkg: warning: old qemu-system-
dpkg: trying script from the new package instead ...
dpkg: ... it looks like that went OK
Unpacking qemu-system-
Note:
if installing without proposed there is a block on
qemu-system-gui : Depends: libgdk-pixbuf-2.0-0 (>= 2.22.0) but it is not installable
So to migrating this to hirsute-release this might have some dependencies.
Christian Ehrhardt (paelzer) wrote : | #11 |
Repackaged deb of 5.1+dfsg-4ubuntu1 to allow users unable to wait for 5.1+dfsg-4ubuntu1 to work around the issue.
Christian Ehrhardt (paelzer) wrote : | #12 |
For those in a hurry that just want things to work again here a few workarounds for now:
Workaround #1 - uninstall and install
$ apt remove qemu-system-gui
# the remove will complain the same way as the upgrade, but an install
# of the new version over this state "rH" works.
# You most likely had this installed through qemu-system-x86
# so remember to re-install dependency removed packages as well:
$ apt install qemu-system-x86 qemu-system-gui
Workaround #2 - use repackaged 5.1+dfsg-4ubuntu1 (If you can't remove qemu* packages for some reason)
# replace original 5.1+dfsg-4ubuntu1 with one that does not have the prerm issue
$ wget https:/
$ dpkg -i qemu-system-
# upgrade to 5.1+dfsg-4ubuntu2 (now working)
$ apt install qemu-system-gui
Christian Ehrhardt (paelzer) wrote : | #13 |
Workaround #3 - use the PPA version
$ sudo add-apt-repository ppa:ci-
$ apt install qemu-system-gui
# or
$ apt install upgrade
# This will need libgdk-pixbuf-2.0-0 from proposed thou
Christian Ehrhardt (paelzer) wrote : | #14 |
FYI This is all good in regard to autopkgtests now, should move to released in the next Britney run.
Launchpad Janitor (janitor) wrote : | #15 |
This bug was fixed in the package qemu - 1:5.1+dfsg-4ubuntu3
---------------
qemu (1:5.1+
* d/qemu-
the bad old prerm (LP: #1906245)
-- Christian Ehrhardt <email address hidden> Mon, 30 Nov 2020 12:53:03 +0100
Changed in qemu (Ubuntu): | |
status: | In Progress → Fix Released |
Hi Matthieu,
thanks for the report, but this bug is known and fixed under bug 1905377 in the version you report this against.
It is the "old" maintainer script that still has an issue (and we can't fix that old script).
You can work around the issue by doing: qemu/Debian
rm -rf /var/run/