On 11/11/22 14:10, Jitka Plesnikova wrote:
> Something like this should work:
>
> File: /usr/lib/rpm/fileattrs/perllib.attr
>
>
> %__perllib_requires() %{lua:
> if macros['1']:match('.+%.so$') and macros.perl_version then
> print('perl(:MODULE_COMPAT_' .. macros.perl_version .. ')')
> else
> print('perl-libs')
> end
> }
> %__perllib_path ^(%{perl_vendorarch}|%{perl_vendorlib})/.+
>
>
> (Untested.)
>
Thanks for hint. I'll check if it works for my change.
Jitka
MODULE_COMPAT is used for 1) Perl Modules and also 2) for packages which
use perl interpreter or libperl.so.
For the second case, the RPM dependency generator above does not work.
These packages may not contain
the Perl directories.
For now, I prefer to use the change describe in the proposal. It works
for all these cases.
Jitka
--
Jitka Plesnikova
Senior Software Engineer
Red Hat