Bug 867375 - "rhel" gets defined as "0" on Fedora which breaks usage of %{!?rhel:foo}
Summary: "rhel" gets defined as "0" on Fedora which breaks usage of %{!?rhel:foo}
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: fedpkg
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-17 11:46 UTC by Thorsten Leemhuis
Modified: 2013-01-10 06:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-07 13:21:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Thorsten Leemhuis 2012-10-17 11:46:48 UTC
Description of problem:
The configure call in mesa.spec of f18 contains this:
> --with-egl-platforms=x11,drm%{!?rhel:,wayland} \

That "%{!?rhel:foo}" works as expected (e.g. wayland is enabled) in the buildsys for F18 and when used with rpmbuild on F18, but not with "fedpkg local on F18.

Further digging revealed that this is happens due to fedpkg setting rhel as "0". I came to this conclusion after adding these two lines to a spec file:

> echo X%{rhel}X
> exit 1

When calling "fedpkg local" then the output is this:

> + echo X0X
> X0X
> + exit 1

Running "fedpkg srpm" and running "rpmbuild -ba foo.spec" I got this:

> + echo 'X%{rhel}X'
> X%{rhel}X
> + exit 1

YMMV, but I'd say this is a bug -- the alternative would be too forbid "%{!?rhel:foo}", which might lead to bugs, as it's yet another thing people could forget :-/

Comment 1 Jesse Keating 2012-10-17 18:59:52 UTC
This is a recent change, requested because /not/ setting it to 0 was breaking other things.  http://lists.fedoraproject.org/pipermail/devel/2012-September/171353.html

Not really sure what to do here, I'm not paying much attention to fedpkg since I moved to the anaconda team.  Welcoming suggestions.

Comment 2 Thorsten Leemhuis 2012-11-07 13:21:26 UTC
I expect this is fixed; if anyone is looking for details see:
http://thread.gmane.org/gmane.linux.redhat.fedora.devel/170536/focus=170551


Note You need to log in before you can comment on or make changes to this bug.