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: rc   
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.