Bug 1306438

Summary: rpm -l --noghost does not work
Product: [Fedora] Fedora Reporter: Zbigniew Jędrzejewski-Szmek <zbyszek>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: jzeleny, lkardos, novyjindrich, packaging-team-maint, pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-19 12:31:18 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:

Description Zbigniew Jędrzejewski-Szmek 2016-02-10 21:08:00 UTC
Description of problem:
rpm accepts undocumented option --noghost (mentioned on the web in a few places), but it has no effect:

$ rpm -ql systemd|grep /etc/hostname
/etc/hostname
$rpm -ql --noghost systemd|grep /etc/hostname
/etc/hostname

rpm --dump also doesn't return this information.

Version-Release number of selected component (if applicable):
rpm-4.13.0-0.rc1.7.fc23.x86_64

Expected results:
It's possible to query the contents of an rpm without installing it.

Comment 1 Ľuboš Kardoš 2016-02-11 08:44:42 UTC
Yes, it seems that "--noghost" doesn't work. For now you can use:

    rpm -q --qf "[%{filenames}\t%{fileflags:fflags}\n]" packagename

"g" means a ghost file in the output of this command.

Comment 2 Zbigniew Jędrzejewski-Szmek 2016-02-11 12:58:53 UTC
OK, thanks for the info.

Comment 3 Ľuboš Kardoš 2016-02-19 12:31:18 UTC
Fixed upstream [1]. There is an easy workaround for rpm which is in Fedora now. This fix will get into Fedora when the new rpm will be released and pushed to Fedora. If you really need this fix in the current Fedora, please reopen the bug.

[1] https://github.com/rpm-software-management/rpm/commit/efd696d32d343b82832dd9e4aee992bff8e64ad0