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
A selector for all "good" files would be | rpm -q --qf '[%{FILESTATES} %{FILENAMES}\n]' "$package" | grep '^0 ' | cut -f2- -d ' '
Added to policycoreutils-1.19.2-2