Bug 62584 - %define in spec-file overrides define given on command-line
%define in spec-file overrides define given on command-line
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2002-04-02 15:14 EST by David Juran
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-04-02 15:15:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Juran 2002-04-02 15:14:59 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020313

Description of problem:
%define statements given in the spec-file overrides --define given on the
command line

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

How reproducible:

Steps to Reproduce:
While building a package from it's src rpm e.g. rpm itself, there is a define in
the spec-file
Now I would like to be able to use the command 
rpm --rebuild --define='with_python_subpackage	0'
to build a package without python. But I can't because the define in the
spec-file overrides me command line option. I think it would be better if it
were the other way around, i.e. anything given on the commandline would override
statements in the spec-file


Actual Results:  %{with_python_subpackage} evalutes to 1 no matter what I write
on the command line

Expected Results:  %{with_python_subpackage} evalutes to whatever I write on the

Additional info:
Comment 1 Jeff Johnson 2002-04-03 17:09:14 EST
Yes spec file defines take precedence.

You can change this behavior by testing
whether a given macro is already defined.

%{!?with_python_subpackage:%define with_python_subpackage whatever}

Simply editing the rpm spec file works as well.

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