Bug 143841 - [fixfiles] Should apply to installed files only
Summary: [fixfiles] Should apply to installed files only
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-29 20:14 UTC by Enrico Scholz
Modified: 2007-11-30 22:10 UTC (History)
3 users (show)

Fixed In Version: 1.19.2-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-04 23:30:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Enrico Scholz 2004-12-29 20:14:33 UTC
Description of problem:

'fixfiles -R ...' should visit only installed files. Currently, it
handles all files shipped by an rpm.

Reasons, why files are not installed, can be:

* a set '%_install_langs' macro
* a set '%_netsharedpath'
* manual '--exclude*' options


E.g. on a machine where '/usr' is in %_netsharedpath

| # fixfiles -R coreutils relabel
| restorecon get context on /usr/bin/[ failed: 'Operation not supported'
| ...
| restorecon get context on /usr/share/man/man1/yes.1.gz failed: 'Operation not supported'


or when only some languages are installed:

| # fixfiles -R coreutils relabel
| lstat(/usr/share/locale/af/LC_MESSAGES/coreutils.mo) failed: No such file or directory
| ...
| lstat(/usr/share/locale/zh_TW/LC_TIME/coreutils.mo) failed: No such file or directory



Such files can be identified with the '-qs' switch

| # rpm -qs coreutils
| normal        /sbin/runuser
| net shared    /usr/bin/[
| ...
| net shared    /usr/share/man/man1/yes.1.gz

resp.

| normal        /usr/share/info/coreutils.info.gz
| not installed /usr/share/locale/af/LC_MESSAGES/coreutils.mo
| ...
| not installed /usr/share/locale/zh_TW/LC_TIME/coreutils.mo
| normal        /usr/share/man/man1/basename.1.gz



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

policycoreutils-1.19.1-1


How reproducible:

100%


Steps to Reproduce:
1. echo '%_install_langs C' >>/etc/rpm/macros
2. install/upgrade an rpm package with %lang(...) specifiers
3. run 'fixfiles -R ...' on this package


Actual results:

lots of bogus warnings and errors

Comment 1 Enrico Scholz 2004-12-29 20:50:26 UTC
A selector for all "good" files would be

| rpm -q --qf '[%{FILESTATES} %{FILENAMES}\n]' "$package" | grep '^0 ' | cut -f2- -d ' '


Comment 2 Daniel Walsh 2005-01-03 18:54:30 UTC
Added to policycoreutils-1.19.2-2


Note You need to log in before you can comment on or make changes to this bug.