Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1921620

Summary: --force --allfiles have no effect
Product: Red Hat Enterprise Linux 8 Reporter: lejeczek <peljasz>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NOTABUG QA Contact: swm-qe
Severity: high Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, carl, jwboyer, pmatilai
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-02 14:13:05 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 lejeczek 2021-01-28 10:14:20 UTC
Description of problem:

-> $ rpm -iv --force --allfiles --nodeps --replacefiles centos-stream-repos-8-2.el8.noarch.rpm -vvv

Repos config files in /etc/yum.repos.d do not get replaced.
I do not know if that misbehaviour goes for every package but this one example certainly shows '--force' is ignored.

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

RPM version 4.14.3

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Panu Matilainen 2021-01-28 10:32:17 UTC
>       --force
>              Same as using --replacepkgs, --replacefiles, and --oldpackage.

These only apply to file conflict resolution and package installed status checks, and are not something people should be ever using really.

There's no way to override rpm %config file behavior at all, never was. Which is kinda strange actually.

Comment 2 Panu Matilainen 2021-02-02 14:13:05 UTC
So... this is not a bug, rpm is behaving as expected and documented, although I can see how the cli switches would be easy to mistake to do something else. 

While rpm *should* have a way to override the %config file behavior, this feature has been missing for 20+ years so it doesn't seem particularly critical and we have no plans to address this in RHEL 8 context, but it'll be considered in future rpm upstream development.

Comment 3 lejeczek 2021-02-03 09:28:34 UTC
Yes, but it's a big shame yes.
I'm ready to bet my breakfast - each one who will not find Panu's answer & explanation(or is rpmspec practitioner) will assume what I've assumed and while might not feel bothered to file a bugzilla one will get puzzled, especially after reading the following..:

 --force
              Same as using --replacepkgs, --replacefiles, and --oldpackage.
...
--replacefiles
              Install the packages even if they replace files from other, already installed, packages.
--replacepkgs
              Install the packages even if some of them are already installed on this system.

Thus if not really, truly a bug then I very much hope everybody will agree - man pages could use a very concrete & explicit update-correction in those sections.

regards, L.