Bug 1966554

Summary: after upgrade from 6.9.2 to 6.10 (sat and capsule) some ruby 2.5 packages still on the system
Product: Red Hat Satellite Reporter: tstrych
Component: PackagingAssignee: Evgeni Golov <egolov>
Status: CLOSED ERRATA QA Contact: tstrych
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: ahumbe, egolov, ehelms, lpramuk, lvrtelov, myarboro
Target Milestone: 6.10.0Keywords: Triaged, Upgrades
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-activerecord-import-1.0.0-6.1, tfm-rubygem-rainbow-2.2.1-5.1, tfm-rubygem-anemone-0.7.2-22.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:11:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description tstrych 2021-06-01 11:43:51 UTC
Description of problem:
New part of 6.10 is that ruby 2.5 is upgraded to ruby 2.7. 
So in 6.10 there should be no ruby 2.5 package 
after upgrade from 6.9.2 to 6.10 (applies for sat and capsule) some ruby 2.5 packages still on the system.

This is new feature in 6.10. 
Please connect this BZ to Epic SAT-379 Move to Ruby 2.7.
This can be duplicate of some BZ created by Eric Helms. In that case please mark this BZ as duplicate. 

How reproducible:
Always


Steps to Reproduce:
1. Upgrade 6.9 satellite
2. rpm -qa | grep rh-ruby25 
3. run script, written by developers to check package dependencies

Actual results:
Some packages are on the system.

Expected results:
There should be none of them

Additional info:
script:
```
#!/usr/bin/env ruby

packages = `yum list installed -q`.split("\n")
packages.shift
packages.pop

packages = packages.map { |package| package.split(' ')[0] }

depends_on_ruby25 = []

packages.each do |package|
  requires = `rpm -q #{package} --requires`
  depends_on_ruby25 << package if requires.include?('rh-ruby25')
end

puts depends_on_ruby25
```


output after satellite upgrade:
rh-ruby25-ruby.x86_64
rh-ruby25-ruby-irb.noarch
rh-ruby25-ruby-libs.x86_64
rh-ruby25-rubygem-bigdecimal.x86_64
rh-ruby25-rubygem-bundler.noarch
rh-ruby25-rubygem-did_you_mean.noarch
rh-ruby25-rubygem-io-console.x86_64
rh-ruby25-rubygem-json.x86_64
rh-ruby25-rubygem-minitest.noarch
rh-ruby25-rubygem-openssl.x86_64
rh-ruby25-rubygem-psych.x86_64
rh-ruby25-rubygem-rake.noarch
rh-ruby25-rubygem-rdoc.noarch
rh-ruby25-rubygems.noarch
rh-ruby25-runtime.x86_64
tfm-rubygem-activerecord-import.noarch
tfm-rubygem-anemone.noarch
tfm-rubygem-rainbow.noarch



output after capsule upgrade:
rh-ruby25-ruby.x86_64
rh-ruby25-ruby-irb.noarch
rh-ruby25-ruby-libs.x86_64
rh-ruby25-rubygem-bigdecimal.x86_64
rh-ruby25-rubygem-bundler.noarch
rh-ruby25-rubygem-did_you_mean.noarch
rh-ruby25-rubygem-io-console.x86_64
rh-ruby25-rubygem-json.x86_64
rh-ruby25-rubygem-openssl.x86_64
rh-ruby25-rubygem-psych.x86_64
rh-ruby25-rubygem-rake.noarch
rh-ruby25-rubygem-rdoc.noarch
rh-ruby25-rubygems.noarch
rh-ruby25-runtime.x86_64

Comment 2 tstrych 2021-06-28 16:00:37 UTC
Verified.
After BZ https://bugzilla.redhat.com/show_bug.cgi?id=1972995 was resolved. Vsedmik was successfully able to upgrade satellite. I did test this on his upgraded setup.
Upgrade was done with 6.9.3 snap 5 to 6.10 snap 6.
Steps in description were applied and no package were found after upgrade by rpm -qa | grep ruby25 or by the script. So, moving to Verified.

Comment 5 errata-xmlrpc 2021-11-16 14:11:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4702