Hide Forgot
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.
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.
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?