quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] [PATCH] setup: Optimize the generation of the series fil


From: Jean Delvare
Subject: Re: [Quilt-dev] [PATCH] setup: Optimize the generation of the series file
Date: Thu, 06 Mar 2014 15:10:58 +0100

Le Thursday 06 March 2014 à 14:25 +0100, Andreas Grünbacher a écrit :
> if you're *really* worried about the speed of this loop, a cleaner
> approach would
> be to remember all the patches in an array, e.g.,
> 
> declare -a patches
> while read tag dir arg1 arg2
> do
>     [...]
>         set -- "$arg1" $arg2
>         address@hidden"$*"
>     [...]
> done < $tmpfile
> 
> if [ address@hidden -gt 0 ]
> then
>     [...]
>     (   echo ...
>         printf "%s\n" "address@hidden"
>     ) > "$prefix$dir/$QUILT_SERIES"
> fi

Bah, doesn't work actually :( "$dir" is local to the "while read" loop
above. And the reason for that is that there can be several tarballs,
and patches attached to each of them, with multiple series files. Which
means my own patch is broken, as it assumes a single series file. Our
test case doesn't test for this, which is why I didn't notice the
breakage.

I guess I don't care enough about it after all, and I am busy enough
with more urgent and important matters, so I'll just give up. If I must
spend more time on this, I'd rather extend the test case so that it
catches future mistakes like the one I just made. Thanks for catching
it, even if that wasn't on purpose ;-)

-- 
Jean Delvare
SUSE L3 Support




reply via email to

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