Bug 729852

Summary: Inconsistent Mock behavior with --define 'exp macro'
Product: [Fedora] Fedora EPEL Reporter: JohnStanley <john.stanley>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: el6CC: mebrown, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-17 04:37:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description JohnStanley 2011-08-11 03:36:45 UTC
Description of problem:

--define 'exp macro' expects to be right after the mock config file used. If put elsewhere it will not work. Also some srpms it will not work on, for 
example kernel but it will on redhat-release*.

Version-Release number of selected component (if applicable):

mock-1.1.11-*.el6.noarch

How reproducible:

Always

Steps to Reproduce:
1.  mock -r myconfig-6-x86_64 my.el6.srpm --define 'dist .el6_6'
  
Actual results:

No error but the --define is ignored.. and some rpms will not get the dist tag that you use.

Expected results:

To work where ever it is used on the command line, before or after the srpm and work on all srpms.

Additional info:

Works as:
 mock -r myconfig-6-x86_64 --define 'dist .el6_6' redhat-release*

Comment 1 JohnStanley 2011-08-12 18:50:55 UTC
(In reply to comment #0)
> Description of problem:
> 
> --define 'exp macro' expects to be right after the mock config file used. If
> put elsewhere it will not work. Also some srpms it will not work on, for 
> example kernel but it will on redhat-release*.

Perhaps the the kernel.spec has no %{?dist} tag...So %define overrides it. 

The commandline should take priority though..

# The kernel tarball/base version
%define kversion 2.6.32-131.0.15.el6

Comment 2 JohnStanley 2011-08-17 04:36:56 UTC
Can be closed as not a Mock problem.

Comment 3 JohnStanley 2011-08-17 04:37:34 UTC
Set status to Closed.