%requires macro error when build in redhat6

Panu Matilainen pmatilai at laiskiainen.org
Wed Jan 16 11:52:35 UTC 2013

On 01/15/2013 09:55 AM, Hasan Yavuz wrote:
> Hello all
> I have an error when build rpm in redhat 6:
> error: line 16: Dependency tokens must begin with alpha-numeric, '_' or
> '/': Requires: %{REQUIRES}
> Here the entry in my spec file:
> Requires: %{REQUIRES}
> Here the entry in my rpmmacros file:
> %REQUIRES       expect gawk python rcs screen tar wget

Putting dependency information into a local macro file seems rather 
strange to me, such information belongs to the spec. If you have a huge 
pile of packages which all share these same dependencies and you want to 
avoid repeating them everywhere, you can use %include on a common source 
file instead.

Also overloading macros this way has side-effects which might not be 
visible in a very simple spec but are likely to bite you sooner or 
later: the above construct breaks if you add another Requires: line 
above the "Requires: %{REQUIRES}" one. Its safer to use macro names 
which have no meaning for rpm, be it %my_common_requires or whatever.

	- Panu -

More information about the Rpm-list mailing list