kernel requires
Jeff Johnson
n3npq at mac.com
Mon Oct 22 22:52:31 CEST 2007
On Oct 22, 2007, at 3:54 PM, Elan Ruusamäe wrote:
> %if %{with dist_kernel}
> %requires_releq_kernel
> Requires(postun): %releq_kernel
> %endif
>
> $ rpm -E %requires_releq_kernel
> Requires: kernel = 3:2.6.22.10-1
> $ rpm -E %releq_kernel
> kernel = 3:2.6.22.10-1
>
> why both are there?
>
Both are there because the flags differ. If the
flags were the same, then rpm would have
collapsed the duplicate:. E.g. the clearly
redundant
Requires: foo
Requires: foo
leads to one, not 2, dependencies in a *.rpm.
> if plain requires is there, then (postun) makes no sense
> if only postun is needed, then plain shouldn't be there.
>
All depends on the "preun" context interpretation, which atm
is largely unspecified.
One cannot assume that
Requires: kernel = 3:2.6.22.10-1
implies
Requires(postun): kernel = 3:2.6.22.10-1
For perhaps a clearer and more well defined context
usage case example, look at
Requires(pre)
Requires(post)
which are both in a "install" context. After installing,
the dependencies are meaningless. And so "install"
dependencies are not indexed in an rpmdb.
hth
73 de Jeff
More information about the pld-devel-en
mailing list