Bug 1516219

Summary: Shows incorrect file content
Product: [Fedora] Fedora Reporter: Milan Crha <mcrha>
Component: mcAssignee: Jindrich Novy <novyjindrich>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dvlasenk, egmont, novyjindrich, pahan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-27 09:48:20 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 Milan Crha 2017-11-22 10:03:46 UTC
Using mc-4.8.19-5.fc26.x86_64, but I noticed it earlier too. I use midnight to unpack files, explore content of rpm packages and so on. Steps like the below lead to confusion:

a) open midnight commander and go to /tmp
b) download any rpm file and name it a.rpm [1]
c) in midnight, select the a.rpm and press Enter
d) then select CONTENTS.cpio file and press Enter
e) now you see what the package contains/will install
f) download a very different rpm file and name it a.rpm [2]
g) in midnight, select the a.rpm and press Enter
h) then select CONTENTS.cpio file and press Enter
i) now you see what the package contains/will install, except it's not
   for [2], but still for [1].

When you rename the a.rpm to b.rpm, then midnight will show the correct content (unless you already had opened the b.rpm in it).

[1] wget -O a.rpm https://kojipkgs.fedoraproject.org//packages/evolution/3.27.2/1.fc28/x86_64/evolution-bogofilter-3.27.2-1.fc28.x86_64.rpm
    Which installs into /usr/lib64/evolution/modules/module-bogofilter.so
[2] wget -O a.rpm https://kojipkgs.fedoraproject.org//packages/evolution/3.27.2/1.fc28/x86_64/evolution-pst-3.27.2-1.fc28.x86_64.rpm
    Which installs into /usr/lib64/evolution/plugins/....

Comment 1 Egmont Koblinger 2017-11-24 10:31:47 UTC
mc caches the contents of such archives for better performance. It should, however, realize if the underlying file changes and ignore the cache then.

Filed upstream at https://midnight-commander.org/ticket/3875.

Comment 2 Milan Crha 2017-11-27 09:48:20 UTC
Thanks. Let's close it here and get a fix once the midnight developers make it. It doesn't look like to be any time soon, as the issue 62 is very old, even it looks particularly simple to implement (I confess I've no idea of midnight sources).