package google-compute-engine-oslogin 20170718-0ubuntu1~16.04.0 failed to install/upgrade: there is no script in the new version of the package - giving up
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gce-compute-image-packages (Ubuntu) |
Fix Released
|
Medium
|
Balint Reczey | ||
Trusty |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Zesty |
Fix Released
|
Undecided
|
Unassigned | ||
Artful |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* The bug make dpkg fail to remove/upgrade the 20170718-0ubuntu1* versions of the package with the following error when openssh-server is not installed:
...
Selecting previously unselected package google-
Preparing to unpack .../google-
Deactivating Google Compute Engine OS Login.
cp: cannot stat '/etc/ssh/
...
dpkg: warning: subprocess old pre-removal script returned error exit status 1
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
...
* This problem may interrupt upgrading other packages as well hence fixing it in stable releases as well is justified.
* The fix is adding an always succeeding prerm script which dpkg can fall back to.
[Test Case]
1. Install openssh-server and ensure ssh server is started
2. Install google-
3. Purge openssh-server
4. Run apt-get dselect-upgrade to trigger upgrade of google-
4.a. Upgrading to an unfixed version will fail with the errors reported in this bug
4.b. Upgrading to a fixed version succeeds.
[Regression Potential]
* The added prerm may let package upgrades succeed which were broken for other reasons but the way around that would be adding code which would check for exactly this breakage and this seems to be overkill.
* It seems to be highly unlikely to cause other regressions.
[Original Bug Report Text]
It's taking more than normal time period while booting.
ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: google-
ProcVersionSign
Uname: Linux 4.10.0-38-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: amd64
Date: Mon Nov 20 08:25:50 2017
ErrorMessage: there is no script in the new version of the package - giving up
InstallationDate: Installed on 2017-06-11 (164 days ago)
InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
RelatedPackageV
dpkg 1.18.4ubuntu1.2
apt 1.2.24
SourcePackage: gce-compute-
Title: package google-
UpgradeStatus: No upgrade log present (probably fresh install)
tags: | removed: need-duplicate-check |
Changed in gce-compute-image-packages (Ubuntu): | |
assignee: | nobody → Balint Reczey (rbalint) |
Changed in gce-compute-image-packages (Ubuntu): | |
status: | New → Confirmed |
Changed in gce-compute-image-packages (Ubuntu): | |
status: | Confirmed → Triaged |
Changed in gce-compute-image-packages (Ubuntu): | |
status: | Triaged → Fix Committed |
description: | updated |
description: | updated |
tags: |
added: verification-done-trusty removed: verification-needed-trusty |
tags: | added: id-5a1deea9adadd3374070c05b |
The failure is caused by old version's prerm failing because it expected openssh-server to be installed.
Please install openssh-server to let prerm succeed and allow upgrades whithout dpkg stopping on prerm error.
I added the proper fix to the packaging repository recovering even when openssh-server is not installed.