Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1904369

Summary: Package dependency is wrong on Satellite UI
Product: Red Hat Satellite Reporter: Avijit Roy <avroy>
Component: RepositoriesAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: addubey
Severity: medium Docs Contact:
Priority: medium    
Version: 6.7.0CC: addubey, ahumbe, bbuckingham, ehelms, jsherril, ttereshc, zhunting
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-4.1.1.17-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:09:33 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 Avijit Roy 2020-12-04 08:59:54 UTC
Description of problem:

For Example: tfm-rubygem-hammer_cli_foreman_tasks

If we check the dependency using rpm we see the below output. 

rpm -q --requires tfm-rubygem-hammer_cli_foreman_tasks
config(tfm-rubygem-hammer_cli_foreman_tasks) = 0.0.14-1.el7sat
rh-ruby25-ruby(release)
rh-ruby25-ruby(rubygems)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
tfm-rubygem(hammer_cli_foreman) > 0.1.1
tfm-rubygem(hammer_cli_foreman) < 3.0.0 
tfm-rubygem(powerbar) >= 1.0.11
tfm-rubygem(powerbar) < 3.0
tfm-runtime
rpmlib(PayloadIsXz) <= 5.2-1

For the same package, the UI shows a different result. 

Content >> Packages >> Serach for 'tfm-rubygem-hammer_cli_foreman_tasks' >> Dependencies

rh-ruby25-ruby(release)
rh-ruby25-ruby(rubygems)
tfm-rubygem(hammer_cli_foreman) > 0.1.1
tfm-rubygem(hammer_cli_foreman) > 3.0.0   -----> This is showing diffrent in rpm output. 
tfm-rubygem(powerbar) > 3.0  -----> This is showing diffrent in rpm output.
tfm-rubygem(powerbar) >= 1.0.11
tfm-runtime

Version-Release number of selected component (if applicable):
Satellite 6.7+


Actual results:

rpm -q --requires and dependency on satellite UI is showing different information. 


Expected results:
rpm -q --requires and dependency on satellite UI should produce similar information. 

Additional info:

Comment 2 Tanya Tereshchenko 2021-04-20 08:04:31 UTC
Hi Brad, could someone from Katello share how the look up for dependencies is performed int he UI and how Pulp is involved.
I'm struggling a bit to figure out which API call can be used for that. Thanks!

Comment 4 Justin Sherrill 2021-04-20 12:59:20 UTC
Created redmine issue https://projects.theforeman.org/issues/32358 from this bug

Comment 7 Tanya Tereshchenko 2021-04-20 14:38:17 UTC
Nice! Moving to Repositories in a hope that it's the right component :)

Thanks for the fix, Justin!

Comment 8 Bryan Kearney 2021-04-20 19:52:48 UTC
Upstream bug assigned to jsherril

Comment 9 Bryan Kearney 2021-04-20 19:52:50 UTC
Upstream bug assigned to jsherril

Comment 10 Bryan Kearney 2021-04-21 20:04:37 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32358 has been resolved.

Comment 11 Tasos Papaioannou 2021-06-01 17:25:16 UTC
The issue still exists with the fix present.

If I make the corresponding changes in app/services/katello/pulp3/rpm.rb and restart services, then the issue is resolved:

# diff -pruN /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.0.rc2.1/app/services/katello/pulp3/rpm.rb.bak /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.0.rc2.1/app/services/katello/pulp3/rpm.rb
--- /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.0.rc2.1/app/services/katello/pulp3/rpm.rb.bak	2021-06-01 13:16:53.480136494 -0400
+++ /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.0.rc2.1/app/services/katello/pulp3/rpm.rb	2021-06-01 13:17:14.299521837 -0400
@@ -27,7 +27,7 @@ module Katello
 
       def requires
         results = []
-        flags = {'GT' => '>', 'LT' => '>', 'EQ' => '=', 'GE' => '>=', 'LE' => '<='}
+        flags = {'GT' => '>', 'LT' => '<', 'EQ' => '=', 'GE' => '>=', 'LE' => '<='}
 
         backend_data['requires']&.each do |requirement|
           requires_str = ""
@@ -46,7 +46,7 @@ module Katello
 
       def provides
         results = []
-        flags = {'GT' => '>', 'LT' => '>', 'EQ' => '=', 'GE' => '>=', 'LE' => '<='}
+        flags = {'GT' => '>', 'LT' => '<', 'EQ' => '=', 'GE' => '>=', 'LE' => '<='}
 
         backend_data['provides']&.each do |provided|
           provides_str = ""

Comment 12 Brad Buckingham 2021-09-10 17:40:48 UTC
Associating a redmine that addresses that failedqa and moving to POST as PR is merged upstream.

Comment 16 addubey 2021-10-26 08:49:25 UTC
Verified.


Tested on: Satellite-6.10.0 Snap 24.0


Steps followed: 

1. Checking dependency with (rpm -q --requires tfm-rubygem-hammer_cli_foreman_tasks) on the stdout

2. Navigate to Content >> Packages >> Search for 'tfm-rubygem-hammer_cli_foreman_tasks' >> Dependencies



Observation: rpm -q --requires on stdout and dependency on satellite UI possess similar information.

Comment 19 errata-xmlrpc 2021-11-16 14:09:33 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