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

_______________________________________________
Quilt-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to