-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #37742 - Exclude rhn-client-tools for subman upgrade #10280
base: develop
Are you sure you want to change the base?
Conversation
@@ -65,7 +65,7 @@ if ! [ -x "$(command -v subscription-manager)" ] ; then | |||
else | |||
echo "subscription-manager is already installed!" | |||
<% if @subman_setup_scenario == 'registration' -%> | |||
$PKG_MANAGER_UPGRADE subscription-manager > /dev/null 2>&1 | |||
$PKG_MANAGER_UPGRADE --setopt=obsoletes=0 subscription-manager > /dev/null 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$PKG_MANAGER_UPGRADE --setopt=obsoletes=0 subscription-manager > /dev/null 2>&1 | |
$PKG_MANAGER_UPGRADE --exclude=rhn-client-tools subscription-manager > /dev/null 2>&1 |
This approach seems to me a bit more directed. Using obsoletes=0 may cause unintended effects down the road if sub-man or any of its deps use obsoletes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related: oamg/convert2rhel#1164 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have this bit here:
foreman/app/views/unattended/provisioning_templates/snippet/subscription_manager_setup.erb
Lines 32 to 33 in 44160c0
$PKG_MANAGER_REMOVE rhn-client-tools | |
$PKG_MANAGER_INSTALL --setopt=obsoletes=0 subscription-manager |
Right now I haven't looked at it in detail, but this PR implies that the original suggestion was insufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggestion by @bocekm does indeed work more reliable. I'll address that in the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ekohl, as far as I recall from my testing some time back removing rhn-client-tools
before installing sub-man on OL 7 is not sufficient - yum says that sub-man is obsoleted by rhn-client-tools and goes ahead and installs rhn-client-tools instead of sub-man.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* rhn-client-tools obsoletes subscription manager, installation of subman rpm has the flag --setopt=obsoletes=0 set correctly to mitigate this, but the subsequent upgrade of subscription-manager rpm does not * add the --setopt=exclude=rhn-client-tools flag so rhn-client-tools does not get installed instead of upgrade of the subman Signed-off-by: Daniel Diblik <[email protected]>
--setopt=exclude=rhn-client-tools
during an upgrade