From Fedora Project Wiki
(restructure, add the "ignore" option) |
m (→Using %ghost: update link) |
||
Line 31: | Line 31: | ||
Cons: | Cons: | ||
* duplicates in %files are forbidden by [[Packaging | * duplicates in %files are forbidden by [[Packaging:Guidelines#Duplicate_Files|FPG]]. | ||
=== Using Provides: === | === Using Provides: === |
Revision as of 18:20, 17 February 2009
Motivation
Current usage of alternatives is inconsistent, and rpm -qf /some/file will often say the file is unowned, even if it's been created by some package, which is especially misleading and annoying in case of binaries.
Solutions
All of the options below are currently used in Fedora packages.
Ignoring alternativized files
Pros:
- less work for packager(?)
Cons:
- rpm -qf /usr/bin/foo doesn't work
- yum install /usr/bin/foo doesn't work
Using %ghost
%files ... %ghost %{_bindir}/foo
Pros:
- allows globs and generated file lists
- rpm -qf /usr/bin/foo works
- yum install /usr/bin/foo works
Cons:
- duplicates in %files are forbidden by FPG.
Using Provides:
Provides: %{_bindir}/foo
Pros:
- rpm -qf /usr/bin/foo works
- yum install /usr/bin/foo works
- repoquery --whatprovides /usr/bin/foo works
Cons:
- unwieldy with lots of alternativized files