Bug 706672 - something wrong with command line parse
Summary: something wrong with command line parse
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mock
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-22 08:19 UTC by Levente Farkas
Modified: 2011-06-22 19:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-22 19:32:59 UTC
Type: ---


Attachments (Terms of Use)

Description Levente Farkas 2011-05-22 08:19:12 UTC
on rhel-6.1 (where dist is defined by rpm macros), this command line:
mock -r rhel-6.1-i386 --define "rhel 6.1" --rebuild OpenEXR-1.6.1-8.1.el6.src.rpm
will fail while 
mock -r rhel-6.1-i386 --rebuild OpenEXR-1.6.1-8.1.el6.src.rpm
won't. the reason was not to simple to find:-(
in the first case during the root phase in the first case mock do _not_ install ccache and simple miss that part of the chroot setup. and after that during the build phase we've got a stranege error:
--------------------------------
Executing command: ['bash', '--login', '-c', 'rpmbuild -bs --target i686 --nodeps builddir/build/SPECS/OpenEXR.spec']
error: parse error in expression
error: /builddir/build/SPECS/OpenEXR.spec:2: parseExpressionBoolean returns -1
Building target platforms: i686
Building for target i686
Child returncode was: 1
---------------------------------
it seems to me a mock bug.

Comment 1 Panu Matilainen 2011-05-26 07:59:17 UTC
This is the culprit:
--define "rhel 6.1"

Rpm only supports integer and string comparisons in spec expressions.
%{rhel} and %{fedora}, as used in specs, must be integers and "6.1" is not one. A simple reproducer is:

# This is valid
%if 0 < 1
echo FOO
%endif

# this is invalid
%if 0 < 1.0
echo FOO
%endif

--> NOTABUG.

Comment 2 Levente Farkas 2011-05-26 14:00:23 UTC
it's ok (but i don't know that).
but in this case why not install ccache during the root build? what's the connections between these?


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