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

Re: [Xen-devel] compiler errors in latest unstable from 20051027



On Thu, 10 Nov 2005, Adam Heath wrote:

> On Thu, 10 Nov 2005, Keir Fraser wrote:
>
> >
> > On 9 Nov 2005, at 23:04, Adam Heath wrote:
> >
> > > It may fix the one error, but not the big one.
> >
> > You *must* apply the patches in patches/linux-2.6.x before building.
> > They are not optional.
>
> Well, see, that's the funny thing.
>
> I was testing out the debs of unstable I made.  The xen patch that is produced
> calls the existing makefile targets.  I take the patched 2.6.12 debian source,
> revert that back to plain 2.6.12, then name the directory to what the makefile
> expects.  I then generate a diff from the patched tree against the original.
>
> And this patch still failed.
>
> However, I'll dig more into it.

Hmm.  I see something a bit odd.  In buildconfigs/Rules.mk, the shell snippet
that applies the patches in a loop, contains a || exit 1 inside a ()
construct.  This doesn't work.  Please observe the following:

==
adam@gradall:~$ cat /tmp/test.sh
#!/bin/sh
set -x

if [ -d /tmp ]; then
        for i in $(seq 1 10); do ( ! [ $i -eq 9 ] || exit 1 ); done
fi
exit 0
adam@gradall:~$ /tmp/test.sh
+ '[' -d /tmp ']'
++ seq 1 10
+ for i in '$(seq 1 10)'
+ '[' 1 -eq 9 ']'
+ for i in '$(seq 1 10)'
+ '[' 2 -eq 9 ']'
+ for i in '$(seq 1 10)'
+ '[' 3 -eq 9 ']'
+ for i in '$(seq 1 10)'
+ '[' 4 -eq 9 ']'
+ for i in '$(seq 1 10)'
+ '[' 5 -eq 9 ']'
+ for i in '$(seq 1 10)'
+ '[' 6 -eq 9 ']'
+ for i in '$(seq 1 10)'
+ '[' 7 -eq 9 ']'
+ for i in '$(seq 1 10)'
+ '[' 8 -eq 9 ']'
+ for i in '$(seq 1 10)'
+ '[' 9 -eq 9 ']'
+ exit 1
+ for i in '$(seq 1 10)'
+ '[' 10 -eq 9 ']'
+ exit 0
==

Note how the inner exit 1 ran, but it didn't actually abort the loop.  This
means that the patch might fail to apply, or half apply, or have fuzz/offsets,
but the other patches will still be applied, and the makefile won't abort.

The fix is to just remove the ().

This explains why I had part of the smpalts patch applied.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.