Re: [PATCH] Re: [PATCH] eradicate bashisms in scripts/patch-kernel

From: Andreas Mohr
Date: Thu Apr 21 2011 - 07:36:53 EST


Hi,

sorry for the delay. Didn't have a suitable environment at that time,
then it got buried...

On Sun, Apr 03, 2011 at 12:40:04PM -0700, Randy Dunlap wrote:
> On Sun, 3 Apr 2011 20:58:28 +0200 Andreas Mohr wrote:
> > # linux-2.6.38.patch-kernel_test/scripts/patch-kernel linux-2.6.38.patch-kernel_test patch-2.6
> > Current kernel version is 2.6.38 ( Flesh-Eating Bats with Fangs)
> > ===> linux-2.6.38.patch-kernel_test/scripts/patch-kernel: line 253: [: =: unary operator expected <===
> > cannot find patch file: patch-2.6.39
>
> Hi,
>
> Are you trying to update a 2.6.38 kernel directory to 2.6.39?
> I'm a little confused since the command line does not say anything about 2.6.39.

Well, that virtual setup was just for the sake of having a problem test case.
I should have described it in more detail.
It simply tries to increment to the next patch version, which in case
of 2.6.38 input would be 2.6.39 (which... obviously isn't available yet).

> > Since my last patch (the parent mail) happened to modify the very same line,
>
> Parent email from 2007??? wow. :)

Yup - why not simply reply on the original patch?
For suitable tracking, I'd rather have one reference too many than......

Perhaps I should have replied on some ~1995 mail? ;-P

> Why doesn't the debug/trace info show the value of STOPFULLVERSION?
> Is it empty?

Augmented version:

do
CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL"
EXTRAVER=
echo "STOPFULLVERSION is $STOPFULLVERSION"
if [ $STOPFULLVERSION = $CURRENTFULLVERSION ]; then
echo "Stopping at $CURRENTFULLVERSION base as requested."
break
fi


# linux-2.6.30/scripts/patch-kernel linux-2.6.30 patch-2.6
Current kernel version is 2.6.30 ( Man-Eating Seals of Antiquity)
STOPFULLVERSION is
[: 276: =: unexpected operator
Applying patch-2.6.31 (bzip2)... done.
STOPFULLVERSION is
[: 276: =: unexpected operator
Applying patch-2.6.32 (bzip2)... done.
STOPFULLVERSION is
[: 276: =: unexpected operator
Applying patch-2.6.33 (bzip2)... done.
STOPFULLVERSION is
[: 276: =: unexpected operator
Applying patch-2.6.34 (bzip2)... done.
STOPFULLVERSION is
[: 276: =: unexpected operator
cannot find patch file: patch-2.6.35

--> seems so.

> Michal is the new kbuild maintainer, so he could queue it, or I can.

He's been queueing it immediately, thus everything went fine (--> thanks!).

Thanks,

Andreas Mohr
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/