Skip to content

Commit

Permalink
don't fail if yum could not remove packages (#274)
Browse files Browse the repository at this point in the history
also use yum remove everywhere, not both remove and erase
  • Loading branch information
evgeni authored Oct 10, 2018
1 parent 594906b commit 4094ca3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def install_prereqs():
pkg_list = dnf_base.sack.query().filter(name='subscription-manager')
subman_installed = pkg_list.installed().run()
subman_available = pkg_list.available().run()
call_yum("remove", "subscription-manager-gnome")
call_yum("remove", "subscription-manager-gnome", False)
if subman_installed:
if check_rhn_registration() and 'migration' not in options.skip:
print_generic("installing subscription-manager-migration")
Expand Down Expand Up @@ -425,7 +425,7 @@ def unregister_system():
def clean_katello_agent():
"""Remove old Katello agent (aka Gofer) and certificate RPMs."""
print_generic("Removing old Katello agent and certs")
call_yum("erase", "'katello-ca-consumer-*' katello-agent gofer katello-host-tools katello-host-tools-fact-plugin")
call_yum("remove", "'katello-ca-consumer-*' katello-agent gofer katello-host-tools katello-host-tools-fact-plugin", False)
delete_file("/etc/rhsm/ca/katello-server-ca.pem")


Expand All @@ -440,7 +440,7 @@ def install_katello_agent():
def clean_puppet():
"""Remove old Puppet Agent and its configuration"""
print_generic("Cleaning old Puppet Agent")
call_yum("erase", "puppet")
call_yum("remove", "puppet", False)
delete_directory("/var/lib/puppet/")
delete_directory("/opt/puppetlabs/puppet/cache")
delete_directory("/etc/puppetlabs/puppet/ssl")
Expand Down Expand Up @@ -555,7 +555,7 @@ def noop_puppet_signing_run():
def remove_obsolete_packages():
"""Remove old RHN packages"""
print_generic("Removing old RHN packages")
call_yum("remove", "rhn-setup rhn-client-tools yum-rhn-plugin rhnsd rhn-check rhnlib spacewalk-abrt spacewalk-oscap osad 'rh-*-rhui-client' 'candlepin-cert-consumer-*'")
call_yum("remove", "rhn-setup rhn-client-tools yum-rhn-plugin rhnsd rhn-check rhnlib spacewalk-abrt spacewalk-oscap osad 'rh-*-rhui-client' 'candlepin-cert-consumer-*'", False)


def fully_update_the_box():
Expand Down

0 comments on commit 4094ca3

Please sign in to comment.