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 1906831 - modify_c doesn't delete .repodata on failure, preventing consecutive createrepo_c call
Summary: modify_c doesn't delete .repodata on failure, preventing consecutive createre...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: createrepo_c
Version: 8.4
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 8.0
Assignee: amatej
QA Contact: Radek Bíba
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-11 14:01 UTC by Daniel Mach
Modified: 2021-05-18 15:46 UTC (History)
2 users (show)

Fixed In Version: createrepo_c-0.16.2-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:46:42 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:1840 0 None None None 2021-05-18 15:46:50 UTC

Description Daniel Mach 2020-12-11 14:01:50 UTC
Description of problem:
When modifyrepo_c errors on invalid modules.yaml content, it keeps .repodata on disk rather than removing it


Steps to Reproduce:
1. createrepo_c .
2. echo modules > modules.yaml
3. modifyrepo_c --mdtype=modules modules.yaml repodata/
# Critical: Could not update module index from file ./modules.yaml: Unexpected YAML event in document stream [line 2 col 1]
4. createrepo_c --update --keep-all-metadata .
Temporary repodata directory ./.repodata/ already exists! (Another createrepo process is running?)


Actual results:
.repodata is present after failed modifyrepo_c command

Expected results:
.repodata is removed after failed modifyrepo_c command

Comment 1 amatej 2020-12-15 13:52:29 UTC
I have looked into this and I believe modifyrepo_c didn't leave the .repodata behind since it never creates them or works with them in any way. It also doesn't validate the metadata its adding to the repo so it is possible to add invalid modules.yaml (this is kind of inconsistent because mergerepo_c and createrepo_c do validate the modules).

I think some previous run of createrepo_c left .repodata behind which happens on invalid module metadata (because like I said createrepo_c validates the module metadata).
I created a PR so that .repodata are never left behind: https://github.com/rpm-software-management/createrepo_c/pull/238
And a simple test: https://github.com/rpm-software-management/ci-dnf-stack/pull/926

Comment 12 errata-xmlrpc 2021-05-18 15:46:42 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 (createrepo_c 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/RHBA-2021:1840


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