From Fedora Project Wiki
m (fixing category (and move to bottom per mediawiki styleguide)) |
(→Using %ghost: antlr) |
||
Line 35: | Line 35: | ||
Cons: | Cons: | ||
* files owned by multiple packages are forbidden by [[Packaging:Guidelines#File_and_Directory_Ownership|FPG]]. | * files owned by multiple packages are forbidden by [[Packaging:Guidelines#File_and_Directory_Ownership|FPG]]. | ||
Packages using this solution: | |||
* antlr | |||
=== Using Provides: === | === Using Provides: === |
Revision as of 21:54, 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:
- alternativized files are unowned, which means:
- rpm -qf /usr/bin/foo doesn't work
- yum install /usr/bin/foo doesn't work
- repoquery --whatprovides /usr/bin/foo doesn't work
Using %ghost
%files ... %ghost %{_bindir}/foo
Pros:
- allows globs and generated file lists
- alternativized files are owned, which means:
- rpm -qf /usr/bin/foo works
- yum install /usr/bin/foo works
- repoquery --whatprovides /usr/bin/foo works
Cons:
- files owned by multiple packages are forbidden by FPG.
Packages using this solution:
- antlr
Using Provides:
Provides: %{_bindir}/foo
Pros:
- alternativized files are provided, which means:
- rpm -qf /usr/bin/foo works
- yum install /usr/bin/foo works
- repoquery --whatprovides /usr/bin/foo works
- can be processed by yum without downloading additional filelists even if the file lies outside common directories
Cons:
- unwieldy with lots of alternativized files