[Rpm-maint] Filtering blues
Panu Matilainen
pmatilai at laiskiainen.org
Fri Jan 25 11:41:37 UTC 2013
On 01/18/2013 01:15 AM, Alec Leamas wrote:
Hi, and apologies for the late reply...
> I'm somewhat unhappy with current filtering mechanisms, or perhaps just
> not clever enough to use them in the right way.
>
> In a very normal usecase, I have a private library from which I want
> to block the Provides: This is simple enough using
> __provides_exclude_from <some library.so>. Here the story should end, I
> have filtered the Provides: the way I want..
>
> However, the package is now un-installable since the depsolver Requires:
> the symbols I just filtered. This means that I have to filter the same
> symbols which I blocked using __provides_exclude_from from the Requires.
> But this is not a simple __requires_exclude_from, because that will
> filter *all* dependencies from my library. So I have to use
> __requires_exclude, and enumerate each and every symbol catched by
> __provides_exclude_from in a long list.
Yup, it is a bit tricky: when a another program/library links to a
library, it'll show up in DT_NEEDED whether its internal or not. The
linker doesn't really differentiate between the two, and thus rpm cannot
automatically do it either.
> It definitely doable, but it feels clumsy and error-prone. I miss an
> elegant way to do this, something like __provides_requires_exclude_from
> <file-match> which filters the symbols in <filematch> in both Requires:
> and Provides, or, perhaps better, a way to refer to the symbols in a
> <file-match> found by __filter_provides_from so I can use them in
> __requires_exclude.
For filtering internal libraries from requires and provides, the easiest
thing is to have an identical rule for both __filter_provides and
__filter_requires and forget about the _from variants.
>
> But it might be that I just don't understand how to use those macros.
> It's not that intuitive, really.
Agreed, the filtering mechanism is not exactly intuitive or "nice" by
any strech of imagination. Back when it got added, the idea was to first
make it *possible* by providing a low-level mechanism, and later add
some sugar on top to make it easier to use. Only the latter part hasn't
gotten done :-/
- Panu -
More information about the Rpm-maint
mailing list