Bug 1062957

Summary: _install_langs macro is looked at for removals as well as installs.
Product: Red Hat Enterprise Linux 7 Reporter: James Antill <james.antill>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: ffesti, jzeleny, novyjindrich, packaging-team-maint, pknirsch, pmatilai
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1062956 Environment:
Last Closed: 2014-06-12 12:08:24 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:
Bug Depends On: 966715, 1062956    
Bug Blocks: 1062959    

Description James Antill 2014-02-09 09:01:04 UTC
+++ This bug was initially created as a clone of Bug #1062956 +++

Description of problem:
The _install_langs macro is obeyed for removals as well as installs, instead of rpm just looking at if the files are marked as skipped from the install side. This means that it's really hard to use the macro, and the obvious usecase will leave "random" files on the disk.


Version-Release number of selected component (if applicable):
rpm-4.11.1-10.fc20.i686


How reproducible:
Always

Steps to Reproduce:
1. Change _install_langs to en:es
2. rpm -Uvh blah.rpm
3. Change _install_langs to de:en
4. rpm -e blah.rpm
5. rpm -Uvh blah.rpm

Actual results:
You'll now have de:en:es lang files (although the "de" language files will confusingly be in rpm -ql but not matched via. rpm -qf).

Expected results:
Just have de:en files.

Additional info:
In real life you'll be doing a yum reinstall, so steps #4 and #5 happen at the same time (so it's not possible to move #3 after #4).

Comment 2 RHEL Program Management 2014-03-22 06:04:39 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 3 Panu Matilainen 2014-06-12 12:08:24 UTC
This bug as-is is not valid, the reproducer does not behave in the described way because _install_langs is not looked on removals. This is further detailed in the original bug here: https://bugzilla.redhat.com/show_bug.cgi?id=1062956#c1

The actual issue this bug refers to is that there is no remove element present when using replacepkgs problem filter, which is what yum does in bug 1062959. That is not fixable in rpm only due to API design limitations because problem filters are not known at the time the erasure element would need to be added.

The only thing rpm *could* do within existing API constraints is detect that the operation would leave orphans and refuse, but this would only be counter-productive as there is currently no other way to perform a "reinstall", and yum apparently has a workaround for this thing already which would be blocked by this kind of "fix". 

Rpm 4.12 will support an actual reinstall mode which allows properly dealing with changing file policies, which we can consider backporting that once the 4.12 release actually happens and any initial bugs have been shaken out in Fedora-land. However utilizing that will require changes to yum as well.

I'm closing this as NOTABUG because the whole description is so badly off. If you want, feel free to open another bug as an RFE for backporting the reinstall mode.