Bug #17134
puppet-agent-oauth release upgrade uninstalls gem
Fixed in Releases:
Found in Releases:
Description
On upgrade from puppet-agent-oauth 0.5.1-1 to -2, the gem is uninstalled from the AIO environment:
# rpm -ivh http://yum.theforeman.org/releases/1.13/el7/x86_64/puppet-agent-oauth-0.5.1-1.el7.noarch.rpm Retrieving http://yum.theforeman.org/releases/1.13/el7/x86_64/puppet-agent-oauth-0.5.1-1.el7.noarch.rpm warning: /var/tmp/rpm-tmp.BXsAvf: Header V4 RSA/SHA256 Signature, key ID 7dfe6fc2: NOKEY Preparing... ################################# [100%] Updating / installing... 1:puppet-agent-oauth-0.5.1-1.el7 ################################# [100%] # /opt/puppetlabs/puppet/bin/gem list -a oauth *** LOCAL GEMS *** oauth (0.5.1) # rpm -Uvh http://yum.theforeman.org/releases/1.13/el7/x86_64/puppet-agent-oauth-0.5.1-2.el7.noarch.rpm Retrieving http://yum.theforeman.org/releases/1.13/el7/x86_64/puppet-agent-oauth-0.5.1-2.el7.noarch.rpm warning: /var/tmp/rpm-tmp.xH9pS3: Header V4 RSA/SHA256 Signature, key ID 7dfe6fc2: NOKEY Preparing... ################################# [100%] Updating / installing... 1:puppet-agent-oauth-0.5.1-2.el7 ################################# [ 50%] Cleaning up / removing... 2:puppet-agent-oauth-0.5.1-1.el7 ################################# [100%] # /opt/puppetlabs/puppet/bin/gem list -a oauth *** LOCAL GEMS ***
This is due to the preun being run on the old package after the installation of the new, causing uninstallation of the gem. When the release (not version) is incremented, the gem shouldn't be uninstalled by the old package as both packages install the same version.
Associated revisions
History
#1
Updated by The Foreman Bot almost 6 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman-packaging/pull/1400 added
#2
Updated by Dominic Cleal almost 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset foreman-packaging|e121ea4990da1ee03ef70079e375d56f0b8accb9.
fixes #17134 - fix release bump upgrade to keep gem installed
The package preun ran after the post scriptlet, which when the release
and not version was updated, caused the gem to be uninstalled as both
the old and new packages managed the same version.
The gem is now only uninstalled in preun if there are multiple versions
installed (i.e. a second version from the new package). A workaround was
added for the current version 0.5.1 to restore the gem on upgrade.