quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] [PATCH 1/4] Ensure quilt(1) documents the correct patche


From: Jean Delvare
Subject: Re: [Quilt-dev] [PATCH 1/4] Ensure quilt(1) documents the correct patches directory
Date: Fri, 24 Feb 2012 14:54:29 +0100
User-agent: KMail/1.12.4 (Linux/2.6.32.54-0.3-pae; KDE/4.3.5; i686; ; )

On Friday 24 February 2012 08:41:07 am Raphael Hertzog wrote:
> On Fri, 24 Feb 2012, Andreas Gruenbacher wrote:
> > We only need to check if $QUILT_PC/.quilt_patches exists if
> > QUILT_PATCHES is unset, like this (and similar for
> > $QUILT_PC/.quilt_series):
> 
> We could, it's a small behavioural change but one that makes sense.

I don't see any behavioral change, can you elaborate?

> > if [ -z "$QUILT_PATCHES" ]
> > then
> >     if [ -r "$QUILT_PC/.quilt_patches" ]
> >     then
> >             QUILT_PATCHES=$(< "$QUILT_PC/.quilt_patches")
> >     else
> >             QUILT_PATCHES=patches
> >     fi
> > fi

AFAICS this is indeed strictly equivalent to the original code. However 
I am not sure if the code makes sense in the first place. It makes 
setting QUILT_PATCHES take priority over the value in 
$QUILT_PC/.quilt_patches. I think it would make more sense to let the 
value in $QUILT_PC/.quilt_patches have the higher priority. If I set 
QUILT_PATCHES in my ~/.quiltrc to my preferred patches directory name, 
and then work on a different project which was initiated with different 
settings, the project settings should take over my preferences, 
shouldn't they?

So if anything, I'd suggest the following change:

--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -1058,13 +1058,13 @@ fi
 
 if [ -r $QUILT_PC/.quilt_patches ]
 then
-       : ${QUILT_PATCHES:=$(< $QUILT_PC/.quilt_patches)}
+       QUILT_PATCHES=$(< $QUILT_PC/.quilt_patches)
 else
        : ${QUILT_PATCHES:=patches}
 fi
 if [ -r $QUILT_PC/.quilt_series ]
 then
-       : ${QUILT_SERIES:=$(< $QUILT_PC/.quilt_series)}
+       QUILT_SERIES=$(< $QUILT_PC/.quilt_series)
 else
        : ${QUILT_SERIES:=series}
 fi

> So you want me to do this and then to force QUILT_PATCHES=patches in
> the "quilt -h" call?

This wouldn't work with my proposed change above.

-- 
Jean Delvare
Suse L3



reply via email to

[Prev in Thread] Current Thread [Next in Thread]