[Libguestfs] [PATCH] virt-v2v: silence P2V build error on x86_64

Alex Jia ajia at redhat.com
Thu Jun 28 02:19:09 UTC 2012


On 06/27/2012 11:29 PM, Matthew Booth wrote:
> On 27/06/12 04:13, Alex Jia wrote:
>> On 06/18/2012 06:01 PM, Alex Jia wrote:
>>> This is a user case if users build virt-v2v on x86_64 platform
>>> and only want to try V2V section then they must see P2V rpm
>>> build error, it's not necessary for V2V users.
>>>
>>> In addition, if some automation scripts call autobuild.sh on
>>> x86_64 platform then the programming also will exit due to
>>> the buiding error.
>>>
>>
>> Hi Matt, any advise about this? thanks. I guess you have other good 
>> idea ;)
>
> Sorry, Alex. I missed this first time round.
>
> ACK and pushed.
It's okay for me ;) thanks.
>
> Matt
>
>>
>>> Signed-off-by: Alex Jia<ajia at redhat.com>
>>> ---
>>>   autobuild.sh |   15 +++++++++++----
>>>   1 file changed, 11 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/autobuild.sh b/autobuild.sh
>>> index 21886a7..7d07cbd 100755
>>> --- a/autobuild.sh
>>> +++ b/autobuild.sh
>>> @@ -50,6 +50,10 @@ fi
>>>   rm -f $NAME-*.tar.gz
>>>   ./Build dist
>>>
>>> +if [ -z "$ARCH" ]; then
>>> +    ARCH=`uname -p`
>>> +fi
>>> +
>>>   if [ -f /usr/bin/rpmbuild ]; then
>>>     if [ -n "$AUTOBUILD_COUNTER" ]; then
>>>       EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
>>> @@ -63,10 +67,13 @@ if [ -f /usr/bin/rpmbuild ]; then
>>>              --define "extra_release $EXTRA_RELEASE" \
>>>              --clean virt-v2v.spec
>>>
>>> -  rpmbuild --nodeps -ba --target i686 \
>>> -           --define "_sourcedir `pwd`" \
>>> -           --define "extra_release $EXTRA_RELEASE" \
>>> -           --clean rubygem-virt-p2v.spec
>>> +  # virt-p2v only can be built on i686 platform now
>>> +  if [ "$ARCH" = "i686" ]; then
>>> +      rpmbuild --nodeps -ba --target $ARCH \
>>> +               --define "_sourcedir `pwd`" \
>>> +               --define "extra_release $EXTRA_RELEASE" \
>>> +               --clean rubygem-virt-p2v.spec
>>> +  fi
>>>   fi
>>>
>>>   exit 0
>>
>> _______________________________________________
>> Libguestfs mailing list
>> Libguestfs at redhat.com
>> https://www.redhat.com/mailman/listinfo/libguestfs
>
>




More information about the Libguestfs mailing list