Re: Dependency generator hooks and extending default requires/provides

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Sent from my iPhone

> On Jul 1, 2015, at 18:27, Sandro Mani <manisandro@xxxxxxxxx> wrote:
> 
> Hello
> 
> I'm looking at extending the requires and provides strings returned by rpmdeps (background: [1]), and it was suggested to me to use dependency generator hooks to accomplish this [2].
> 
> My initial experiment is
> 
> $ cat /usr/lib/rpm/fileattrs/mpi.attrs
> # the path to your provides generating script
> %__mpi_provides %{_rpmconfigdir}/mpi.prov
> # the path to your requires generating script
> %__mpi_requires %{_rpmconfigdir}/mpi.req
> # a regular expression that paths in an RPM
> # must match to trigger the generator
> %__mpi_path ^%{_prefix}/lib(64)/(openmpi|mpich)/.*$
> 
> $ cat /usr/lib/rpm/mpi.prov
> #!/bin/sh
> /usr/lib/rpm/rpmdeps --provides
> 
> $ cat /usr/lib/rpm/mpi.req
> #!/bin/sh
> /usr/lib/rpm/rpmdeps --requires
> 
> This however triggers what appears to be an endless recursion of calls mpi.prov -> rpmdeps -> mpi.prov -> rpmdeps -> etc
> 
> (Trivial packages which demostrate this issue (rpmbuild & install rpm-mpi-hooks, then rpmbuild mpihooktest):
> https://smani.fedorapeople.org/rpm-mpi-hooks-1.0-1.fc23.src.rpm
> https://smani.fedorapeople.org/mpihooktest-1.0-1.fc23.src.rpm
> )
> 
> 
> Without any knowledge of the rpm codebase, I figure what is happening is that rpmdeps internally honours %__mpi_provides, which causes the endless loop.
> 

Yes.

> So my question: is there any way to write dependency generator hooks which take the output of stock rpmdeps --requires resp. --provides and extend it with some additional text?
> 

You can replace and post-process append additional dependencies.

But you can also rewrite your __mpi_{prov,req} to not invoke rpmdeps.

hth

73 de Jeff


> Thanks,
> Sandro
> 
> 
> [1] https://fedoraproject.org/wiki/Changes/RpmMPIReqProv
> [2] https://lists.fedoraproject.org/pipermail/devel/2015-June/211570.html
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@xxxxxxxxxxxxx
> http://lists.rpm.org/mailman/listinfo/rpm-list
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list



[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux