On Dec 15, 2013, at 9:51 PM, [email protected] wrote:
> Apparently this is a rpm4 feature. But I would like to
> have it working in cooker, that is, to generate some
> provides/requires automatically. For example:
>
> $ cat /usr/lib/rpm/fileattrs/maven.attr
> %__maven_provides %{_rpmconfigdir}/maven.prov
> %__maven_requires %{_rpmconfigdir}/maven.req
> %__maven_path ^%{_mavendepmapfragdir}/.*
>
> $ cat /usr/lib/rpm/maven.prov
> #!/usr/bin/python
> .....
> print "mvn({gid}:{aid}) = {version}".format(gid=groupId,
> .....
>
Easy enough to do the equivalent. In lib/rpmfc.c there is
an if statement in C based on the path value of %{__maven_path} to
trigger setting a bit that runs %__maven_provides/%__requires as needed.
Note that path (instead of file(1)/magic(3) content) based classification is
highly
non-portable: rpm5 actually runs on non-linux.
todo++
73 de Jeff
> Thanks,
> Paulo
>
>