Test:
# install current version - will be >=1:5.1+dfsg-4ubuntu2
$ apt install qemu-system-gui
# get old broken version and install it
$ wget https://launchpad.net/ubuntu/+source/qemu/1:5.1+dfsg-4ubuntu1/+build/20311790/+files/qemu-system-gui_5.1+dfsg-4ubuntu1_amd64.deb
$ dpkg --force-all -i qemu-system-gui_5.1+dfsg-4ubuntu1_amd64.deb
# trigger the bug
$ apt install qemu-system-gui
...
Preparing to unpack .../qemu-system-gui_1%3a5.1+dfsg-4ubuntu2_amd64.deb ...
cp: -r not specified; omitting directory '/var/run/qemu/Debian'
dpkg: warning: old qemu-system-gui:amd64 package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
dpkg: error processing archive /var/cache/apt/archives/qemu-system-gui_1%3a5.1+dfsg-4ubuntu2_amd64.deb (--unpack):
there is no script in the new version of the package - giving up
Errors were encountered while processing:
/var/cache/apt/archives/qemu-system-gui_1%3a5.1+dfsg-4ubuntu2_amd64.deb
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)
Test: dfsg-4ubuntu2 /launchpad. net/ubuntu/ +source/ qemu/1: 5.1+dfsg- 4ubuntu1/ +build/ 20311790/ +files/ qemu-system- gui_5.1+ dfsg-4ubuntu1_ amd64.deb gui_5.1+ dfsg-4ubuntu1_ amd64.deb system- gui_1%3a5. 1+dfsg- 4ubuntu2_ amd64.deb ... qemu/Debian' gui:amd64 package pre-removal script subprocess returned error exit status 1 apt/archives/ qemu-system- gui_1%3a5. 1+dfsg- 4ubuntu2_ amd64.deb (--unpack): apt/archives/ qemu-system- gui_1%3a5. 1+dfsg- 4ubuntu2_ amd64.deb
# 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:/ /launchpad. net/~ci- train-ppa- service/ +archive/ ubuntu/ 4356