[Rpm-maint] various bug fixes (patches)

Michael Schroeder mls at suse.de
Tue Nov 13 18:51:59 UTC 2007


On Tue, Nov 13, 2007 at 02:50:36PM +0200, Panu Matilainen wrote:
> 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 
> welcome.

You don't need the missingok flag for SUSE's weak dependencies
at all, as they are not stored in the normal dependency tags.

If you want to add weak deps you need to decide where to store them.
There are two possibilities:

1) Jeff's way:

   Put suggests into the require dependencies and enhances into
   the provides dependencies. Use the RPMSENSE_MISSINGOK flag
   to tell them apart from normal dependencies.

   Advantage:
     - compatible to rpm-5
     - can do reverse lookups with '--whatprovides' and
       'whatrequires' (this might also be a disadvantage,
        as you currently can't exclude weak deps from
        the searches)
   Disadvantages:
     - breaks with older rpm versions and installers
     - storing enhances as provides is a bit odd

2) SUSE's way:

   Put suggests and enhances in the corresponding tags (they
   already exist in rpm-4, but where not used)

   Advantage:
     - old rpm versions and installers just ignore them
   Disadvantage:
     - incompatible with rpm-5
     - there's currently no index for reverse lookups


Adding a semi-weak version (i.e. recommends/supplements) with
RPMSENSE_STRONG is a different (and minor) issue.

Cheers,
  Michael.

-- 
Michael Schroeder                                   mls at suse.de
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}



More information about the Rpm-maint mailing list