[packagers] noob help needed with %{dist}

Martin Hamant mh at accelance.fr
Mon May 7 13:30:29 CEST 2007


(sorry, bounce again, maybe problem with ML address) 

Le Fri, 4 May 2007 12:20:24 -0400
Jeff Johnson <n3npq at mac.com> écrivait:

> 
> On May 4, 2007, at 12:13 PM, Martin Hamant wrote:
> 
> >
> >
> > Yes it could be useful, and it's not possible do that in a bash  
> > script for example. But so, there is a remaining question : "how
> > do I quote a sample of code which contains expansions, as
> > comment" : I will RTFM.
> 
> Doubling the % character prevents the expansion.
> 
> Specifically, if you want to comment out a
>     %foo
> then you should do
>      # %%foo
> 
> It only matter if %foo expansion is multiline, 2nd and following  
> lines will not be commented out
> 
> 73 de Jeff

Thank you Jeff,

So, I have another question... :)

I did two test, to see how it works, and I can't find any difference in
results ...

I ask for --define "dist el4"

TEST1:

%{?dist: %{expand: %%define %dist 1}}
echo "EL4 : %{el4}"
echo "DIST : %{dist}"

returns :
+ echo 'EL4 : 1'
EL4 : 1
+ echo 'DIST : el4'
DIST : el4

TEST2:

%{?dist: %define %dist 1}
echo "EL4 : %{el4}"
echo "DIST : %{dist}"

returns :

+ echo 'EL4 : 1'
EL4 : 1
+ echo 'DIST : el4'
DIST : el4

How to explain this ? Where is the nuance ?



-- 
Martin



More information about the packagers mailing list