fedpkg / koji error

Thorsten Leemhuis fedora at leemhuis.info
Tue Oct 23 21:22:54 UTC 2012


On 23.10.2012 17:23, Tom Callaway wrote:
> On 10/22/2012 10:37 PM, Ralf Corsepius wrote:
>> On 10/22/2012 10:43 PM, Tom Callaway wrote:
>>> On 10/22/2012 12:09 PM, Ralf Corsepius wrote:
>>>>> There is currently no way to "undefine" a macro at the rpm commandline,
>>>> rpmbuild --define "xxxx %{nil}" ?
>>> Huh, I swear I knew that once. :) Attached is a patch to use the %{nil}
>>> behavior instead of setting the unused dist macro to 0. I smoke tested
>>> and confirmed that the %{rhel} macro is unset on Fedora with this patch
>>> applied.
>> I haven't tried your patch, but don't you have to unset/define %{nil}
>> all build-host related rpm macros from /etc/rpm/macros.dist?
>> It's at least what I can not avoid doing in my before-mentioned
>> build-scripts.
>> I.e. when running my script on Fedora 17, I invoke rpmbuild this way:
>> rpmbuild ... \
>>   --define "fedora %{nil}" --define "fc17 %{nil}"
>>   --define "dist .el6" --define "rhel 6"  --define "el6 1"
>>   ...
>> Otherwise constructs such as
>> %{?fc17:xxxx}
>> %{?el6:yyyy}
>> also won't work correctly in rpm.specs.
>> IIUC, fedpkg with your patch sets %dist and unsets %fedora, but it
>> doesn't seem to catch "fc17".
> Yeah, thats a valid corner case. It wasn't in the original issue, so I
> didn't think about it. I'll work on a fix that covers that as well.

Spot: Thanks for working on this and finding a solution that removes the 
inconsistency I was running into with someone else package.

Ralf: Thanks for the idea with the %{nil}


More information about the devel mailing list