RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1804720 - repomanage tool is not working correctly with modules in AppStream
Summary: repomanage tool is not working correctly with modules in AppStream
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 8.0
Assignee: amatej
QA Contact: Luca Berton
URL:
Whiteboard:
Depends On:
Blocks: 1825061
TreeView+ depends on / blocked
 
Reported: 2020-02-19 14:06 UTC by Roman Bobek
Modified: 2023-09-07 21:57 UTC (History)
9 users (show)

Fixed In Version: dnf-plugins-core-4.0.17-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:52:37 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 4790741 0 None None None 2020-03-16 18:07:47 UTC
Red Hat Product Errata RHEA-2020:4510 0 None None None 2020-11-04 01:52:53 UTC

Internal Links: 1898293

Description Roman Bobek 2020-02-19 14:06:34 UTC
Description of problem:
repomange tool is not working correctly with modules in the new AppStream type repository. It is detecting the packages in modules with older available versions of software as obsolete/old:

# repomanage -k 1 rhel-8-for-x86_64-appstream-rpms
[...]
Packages/p/postgresql-12.1-2.module+el8.1.1+4794+c82b6e09.x86_64.rpm
Packages/p/postgresql-contrib-12.1-2.module+el8.1.1+4794+c82b6e09.x86_64.rpm
Packages/p/postgresql-docs-12.1-2.module+el8.1.1+4794+c82b6e09.x86_64.rpm
Packages/p/postgresql-jdbc-42.2.3-1.el8.noarch.rpm
Packages/p/postgresql-jdbc-javadoc-42.2.3-1.el8.noarch.rpm
Packages/p/postgresql-odbc-10.03.0000-2.el8.x86_64.rpm
Packages/p/postgresql-odbc-tests-10.03.0000-2.el8.x86_64.rpm
Packages/p/postgresql-plperl-12.1-2.module+el8.1.1+4794+c82b6e09.x86_64.rpm
Packages/p/postgresql-plpython3-12.1-2.module+el8.1.1+4794+c82b6e09.x86_64.rpm
Packages/p/postgresql-pltcl-12.1-2.module+el8.1.1+4794+c82b6e09.x86_64.rpm
Packages/p/postgresql-server-12.1-2.module+el8.1.1+4794+c82b6e09.x86_64.rpm
Packages/p/postgresql-server-devel-12.1-2.module+el8.1.1+4794+c82b6e09.x86_64.rpm
Packages/p/postgresql-static-12.1-2.module+el8.1.1+4794+c82b6e09.x86_64.rpm
Packages/p/postgresql-test-12.1-2.module+el8.1.1+4794+c82b6e09.x86_64.rpm
Packages/p/postgresql-test-rpm-macros-10.6-1.module+el8+2469+5ecd5aae.x86_64.rpm
Packages/p/postgresql-test-rpm-macros-12.1-2.module+el8.1.1+4794+c82b6e09.noarch.rpm
Packages/p/postgresql-upgrade-12.1-2.module+el8.1.1+4794+c82b6e09.x86_64.rpm
Packages/p/postgresql-upgrade-devel-12.1-2.module+el8.1.1+4794+c82b6e09.x86_64.rpm
[...]
# repomanage -o -k 1 rhel-8-for-x86_64-appstream-rpms
[...]
Packages/p/postgresql-10.6-1.module+el8+2469+5ecd5aae.x86_64.rpm
Packages/p/postgresql-9.6.10-1.module+el8+2470+d1bafa0e.x86_64.rpm
Packages/p/postgresql-contrib-10.6-1.module+el8+2469+5ecd5aae.x86_64.rpm
Packages/p/postgresql-contrib-9.6.10-1.module+el8+2470+d1bafa0e.x86_64.rpm
Packages/p/postgresql-docs-10.6-1.module+el8+2469+5ecd5aae.x86_64.rpm
Packages/p/postgresql-docs-9.6.10-1.module+el8+2470+d1bafa0e.x86_64.rpm
Packages/p/postgresql-plperl-10.6-1.module+el8+2469+5ecd5aae.x86_64.rpm
Packages/p/postgresql-plperl-9.6.10-1.module+el8+2470+d1bafa0e.x86_64.rpm
Packages/p/postgresql-plpython3-10.6-1.module+el8+2469+5ecd5aae.x86_64.rpm
Packages/p/postgresql-plpython3-9.6.10-1.module+el8+2470+d1bafa0e.x86_64.rpm
Packages/p/postgresql-pltcl-10.6-1.module+el8+2469+5ecd5aae.x86_64.rpm
Packages/p/postgresql-pltcl-9.6.10-1.module+el8+2470+d1bafa0e.x86_64.rpm
Packages/p/postgresql-server-10.6-1.module+el8+2469+5ecd5aae.x86_64.rpm
Packages/p/postgresql-server-9.6.10-1.module+el8+2470+d1bafa0e.x86_64.rpm
Packages/p/postgresql-server-devel-10.6-1.module+el8+2469+5ecd5aae.x86_64.rpm
Packages/p/postgresql-server-devel-9.6.10-1.module+el8+2470+d1bafa0e.x86_64.rpm
Packages/p/postgresql-static-10.6-1.module+el8+2469+5ecd5aae.x86_64.rpm
Packages/p/postgresql-static-9.6.10-1.module+el8+2470+d1bafa0e.x86_64.rpm
Packages/p/postgresql-test-10.6-1.module+el8+2469+5ecd5aae.x86_64.rpm
Packages/p/postgresql-test-9.6.10-1.module+el8+2470+d1bafa0e.x86_64.rpm
Packages/p/postgresql-test-rpm-macros-9.6.10-1.module+el8+2470+d1bafa0e.x86_64.rpm
Packages/p/postgresql-upgrade-10.6-1.module+el8+2469+5ecd5aae.x86_64.rpm
Packages/p/postgresql-upgrade-devel-10.6-1.module+el8+2469+5ecd5aae.x86_64.rpm
[...]

Version-Release number of selected component (if applicable):
yum-utils-4.0.8-3

How reproducible:
allways

Steps to Reproduce:
1. sync the AppStream repository with reposync
  # dnf reposync --repoid=rhel-8-for-x86_64-appstream-rpms
2. use the -o switch with repomanage command to list the old packages in the synced repository
  # repomanage -o -k 1 rhel-8-for-x86_64-appstream-rpms


Actual results:
RPM packages from 'older' modules are listed.

Expected results:
RPM packages from 'older' modules are not considered as old and are not listed.

Comment 2 amatej 2020-05-05 07:04:35 UTC
I agree with the proposed AC and test and also with the note, modular metadata has to be present in order to work properly with modular packages (Maybe we could also include that in the AC and test scenario specification, but not sure if necessary).

PR: https://github.com/rpm-software-management/dnf-plugins-core/pull/394
tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/825

Comment 3 Pavla Kratochvilova 2020-05-06 12:33:25 UTC
Removing needinfo since it was answered in Comment #2.

Comment 11 Paul Howarth 2020-10-25 11:08:31 UTC
I think the fix for this introduces a new problem. The repomanage plugin creates a new temporary repo "repomanage_repo" for the directory to be managed, and that gets cached like a regular repo. Typically, repomanage is used to prune directories of old packages, but the cache can remember packages that were there previously and were removed by a previous run of repomanage, so when repomanage is run again it outputs the names of the packages from the cache that are no longer present.

I think the plugin needs to disable this caching behaviour.

Comment 12 amatej 2020-10-26 14:07:30 UTC
I see, thanks for the heads up.

I will try to address the problem as part of https://bugzilla.redhat.com/show_bug.cgi?id=1890314.

Comment 14 errata-xmlrpc 2020-11-04 01:52:37 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 (yum bug fix and enhancement update), 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/RHEA-2020:4510

Comment 15 amatej 2020-11-20 14:25:36 UTC
(In reply to Paul Howarth from comment #11)
> I think the fix for this introduces a new problem. The repomanage plugin
> creates a new temporary repo "repomanage_repo" for the directory to be
> managed, and that gets cached like a regular repo. Typically, repomanage is
> used to prune directories of old packages, but the cache can remember
> packages that were there previously and were removed by a previous run of
> repomanage, so when repomanage is run again it outputs the names of the
> packages from the cache that are no longer present.
> 
> I think the plugin needs to disable this caching behaviour.

Turns out the bug I mentioned is unrelated, but I have created a fix here: https://github.com/rpm-software-management/dnf-plugins-core/pull/414

Comment 16 Paul Howarth 2020-11-20 14:34:40 UTC
(In reply to amatej from comment #15)
> (In reply to Paul Howarth from comment #11)
> > I think the fix for this introduces a new problem. The repomanage plugin
> > creates a new temporary repo "repomanage_repo" for the directory to be
> > managed, and that gets cached like a regular repo. Typically, repomanage is
> > used to prune directories of old packages, but the cache can remember
> > packages that were there previously and were removed by a previous run of
> > repomanage, so when repomanage is run again it outputs the names of the
> > packages from the cache that are no longer present.
> > 
> > I think the plugin needs to disable this caching behaviour.
> 
> Turns out the bug I mentioned is unrelated, but I have created a fix here:
> https://github.com/rpm-software-management/dnf-plugins-core/pull/414

Thanks. Currently, I've been working around this by using repomanage --setopt=metadata_expire=1


Note You need to log in before you can comment on or make changes to this bug.