Le 2019-06-26 15:39, Richard W.M. Jones a écrit :
On Tue, Jun 18, 2019 at 03:27:41AM +0200, Igor Gnatenko wrote:
as of today, builders have been updated (thanks to Kevin) and
DynamicBuildRequires finally work in Rawhide.
Change Page:
https://fedoraproject.org/wiki/Changes/DynamicBuildRequires
I'm curious why the config-for-MM-YYYY filename needs to contain the
month and year? Both why it needs to have a date at all, and why --
if it needs a date -- that doesn't include the day.
It's just an example. It could have used fruit(cake)
I suppose the date call is here to show up the dynamic aspect of the
feature, though it's a bad example
I'm pretty sure one could do things like
BuildRequires: %(echo config-for-$(date '+%m-%Y'))
on previous rpm versions and it would work.
What would not work before dynamic BuildRequires, is something akin to
%generate_buildrequires
cat deps.txt
with deps.txt included in the upstream source archive with a content
that changes over time. Without dynamic buildrequires you have no way to
act on this file because it is not available for processing before %prep
is done.
Of course this is also an over-simplified example, because there is
little chance that deps.txt exists in an rpm-compatible format upstream.
Usually you have some form of json, yaml or xml file that needs a custom
helper to be converted in rpm build deps. So in the real world you have
%generate_buildrequires
generate-foo-deps
with generate-foo-deps reading the default filename containing deps for
foo language, and converting it to rpm syntax.
Regards,
--
Nicolas Mailhot
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx