Re: FC4 spec file problem: %define doesn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robinson Tiemuqinke wrote:
Hi,
 I found a strange problem with "%define" in .spec
file. my rpm version is 4.4.1-22.

 The problem is: The defined value with '%define' can
not be refered -- see the mykver variable defined with
"%define" which trying to
represent kernel version like "26" or "24". But it
failed to be refered later and I had to comment
'%define' out
and directly put the expression in the "Release:"
statement.
I've seen a lot of '%define' in use in other .spec
files before, then what
is my problem?? Please help.

...
##
## failed to resolve Release with '%define' statement
##
%define mykver %(echo `/bin/uname -r | /bin/cut -c1-3
| /bin/sed -e 's/\.//g'`)

You need to escape the backslash in the %define:

%define mykver %(/bin/uname -r|/bin/cut -c1-3|%{__sed} -e 's/\\.//g')

Paul.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux