Retrieving the value of a macro defined in a spec file

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

 



I'm trying to extract a %global after it has been evaluated as it would end up
during build time. rpmspec -P almost works, but the output is stripped of all
the %global macros, so the macro is not able to be grepped. My understanding
is that I can't use eval as that does not evalute macros that are done only at
build time, which I assume is true for my spec below. I'm interested in getting
the value of release_version, but I guess the process would be the same for any
of them.

%global project_name heat
Source99: sources
%global release_version %(cat %{SOURCE99} | awk %'{sub(/%{project_name}-/, ""); sub(/.tar.gz/, ""); print $2}')
...

It would be great if there were a solution available in python, but I've not
found anything in the TransactionSet API of value. Surely this must be possible
as "fedpkg mockbuild" works as expected.

Jeff
--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging





[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux