[Rpm-maint] allow to remove Requires(pre) or not?
Panu Matilainen
pmatilai at redhat.com
Tue Feb 26 09:37:27 UTC 2008
On Sat, 23 Feb 2008, Pixel wrote:
> this must have been reported already:
>
> # rpm -qR b
> a
> # rpm -q --whatrequires a
> no package requires a
> # rpm -e a
> # rpm -V b
> Unsatisfied dependencies for b-1-1.noarch:
> Requires: a
Yup, known thing: https://bugzilla.redhat.com/show_bug.cgi?id=223642
> rpm is not consistent: "rpm -V" should not say there is an unsatisfied
> dependency for a require(pre) if "rpm -e" allows to remove the
> require(pre)
>
> as for me i'm not convinced that "Requires(pre) not implying Requires"
> is a feature. I would be in favor of "Requires(xxx) implies Requires".
Agreed, permitting remove of (pre|post|...)-only dependencies because they
might not be strictly needed at runtime serves no purpose at all. It only
permits creating absurd situations like having to install another package
in order to be able to remove something you have installed.
The scriptlet context dependencies serve the purpose of helping
transaction ordering and nothing else IMO.
> But if we want to keep current behaviour, we also need a way to query
> wether a require is pre/post or not:
>
> % rpm -q --qf '[%{REQUIRENAME} %{REQUIREFLAGS} %{REQUIREVERSION}\n]' d
> c 512
>
> worse, for a "Requires(pre): foo = 1", one gets 520 (ie
> SENSE_SCRIPT_PRE & RPMSENSE_EQUAL) which is not readable at all.
>
> rpm5 has some code ifdef'ed with NOTYET in depflagsFormat so that
> --requires would show "(pre)", but it's not activated for backward
> compatibility.
Having the (pre) etc context shown in --requires output would be useful
regardless of the erasures-permitted-or-not behavior. I'm sure somebody
somewhere has a script that will break if the format changes, but... Of
course if we play ultra-safe, we could add a separate format for the
verbose output (or have depflagFormats show the extra information only
when rpm is running in verbose mode, or something)
- Panu -
More information about the Rpm-maint
mailing list