[Rpm-maint] various bug fixes (patches)

Panu Matilainen pmatilai at redhat.com
Tue Nov 13 12:50:36 UTC 2007

On Tue, 13 Nov 2007, Pixel wrote:

> Hi, Mandriva is currently using rpm 4.4.8. We are investigating the
> cost to switch to
> Since August 2007, Mandriva uses "Suggests", which is implemented in
> rpm 4.4.3 (?). In rpm 4.4.2.x, there is already partial support for it
> since RPMSENSE_MISSINGOK flag is already there.
> I've crafted a patch. It should be /mostly/ clean.
> - it modifies unsatisfiedDepend() to take RPMSENSE_MISSINGOK into account
> - it adds "--suggests" and "--enhances" to rpmquery
>  (the biggest part of the patch: lib/formats.c, rpmpopt.in
> - it supports Suggests and Enhances in .spec
> - it adds Requires(hint) in .spec
>  (as done in rpm >= 4.4.3, Mandriva doesn't use it though)
> Could this be merged in?

I really don't want this changes of this magnitude in 4.4.2.x but... I 
guess it's time to revisit this (and bunch of others too while at it) 
issue for the next major version.

> FYI Mandriva (urpmi) simply installs "suggested" packages by default.
> It allows users to uninstall those packages. On upgrade, only "new"
> suggested packages are installed ; existing suggestions are not
> installed again (to avoid re-installing packages uninstalled by user).
> nb: Mandriva would like to have a better granularity, ie
> have "Suggests" different from "Enhances" (whereas currently it is the
> same). Maybe RPMTAG_REQUIREVERSION could be used for this (since
> currently it is unused if the flag is only RPMSENSE_MISSINGOK (?)).
> But for now, this is only speculation.

That sounds more or less like what Suse did: there are two levels of soft 
dependencies - strong and weak hints in addition to regular, hard 
dependencies. And I do think the extra level is needed to make full use of 
soft dependencies. Plain RPMSENSE_MISSINGOK flag is very nice and simple 
technically but it limits the usefulness quite a bit.

Actually my main beef with the Suse implementation is really just a naming 
issue about the flags:
+    { "hint",          RPMSENSE_MISSINGOK },
+    { "strong",                RPMSENSE_STRONG },
+       tagflags = RPMSENSE_MISSINGOK;
+       if (macro && (!strcmp(macro, "recommends") || !strcmp(macro, "buildrecommends")))
+           tagflags |= RPMSENSE_STRONG;

"This is a strong missingok" just .. spells odd to me. I'd rather have 
something like RPMSENSE_HINT (which is treated as "missing ok") and 
RPMSENSE_HINT_STRONG (and "stronghint" for the spec visible part) or 
something to that effect. Better suggestions (no pun inteded :) are most 

Oh and in case it's not obvious from the above, I do want soft 
dependencies into the next major rpm version.

 	- Panu -

More information about the Rpm-maint mailing list