Discussion:
%requires macro error when build in redhat6
Hasan Yavuz
2013-01-15 07:55:46 UTC
Permalink
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

All these values are working fine with Redhat 5 and redhat 4.

Does anyone have an idea?

Thanks
Panu Matilainen
2013-01-16 11:52:35 UTC
Permalink
Post by Hasan Yavuz
Hello all
error: line 16: Dependency tokens must begin with alpha-numeric, '_' or
'/': Requires: %{REQUIRES}
Requires: %{REQUIRES}
%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 -

Loading...