Re: SOLVED Re: Mock for more than one config\arch?

2010-07-12 Thread Adam Williamson
On Mon, 2010-07-12 at 10:50 +0100, Frank Murphy wrote:
> On 12/07/10 10:01, Kalev Lember wrote:
> > On 07/12/2010 11:39 AM, Frank Murphy wrote:
> >> I'm doing something wrong but what is the correct sequence to build for
> >> more that one arch, mock --help\man not throwing much light for me.
> >>
> >> mock -r fedora12.i386 fedora12.x86_64 fedora 13.xx fedoraDevel.xx
> >> --rebuild --resultdir=/some/local/path somesrc.rpm
> >>
> >>
> >
> > for ARCH in fedora-12-i386 fedora-12-x86_64 fedora-rawhide-i386 ; do
> >   mock -r $ARCH mypackage.src.rpm
> > done
> >
> 
> Is it basically bash script?
> I'm not excellent currently with a cli.

to digress, that is indeed a scripting technique. it's really just very
basic logic, it's in compsci 101 (not that I've ever taken it :>).

it's a generic technique. what it does is tell the shell to run this
command:

mock -r (SOMETHING) mypackage.src.rpm

several times, and change the (SOMETHING) each time. The different
values of (SOMETHING) are defined in the first bit of the command:

for ARCH in fedora-12-i386 fedora-12-x86_64 fedora-rawhide-i386

that means set ARCH - the (SOMETHING) - to be fedora-12-i386 , then
fedora-12-x86_64 , then fedora-rawhide-i386 . So bash will wind up
running three commands:

mock -r fedora-12-i386 mypackage.src.rpm
mock -r fedora-12-x86_64 mypackage.src.rpm
mock -r fedora-rawhide-i386 mypackage.src.rpm

you can keep adding different arches to the list in the 'for ARCH in'
section of the command, as many as you like. you can use the same trick
in all sorts of different ways.
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Fedora Talk: adamwill AT fedoraproject DOT org
http://www.happyassassin.net

-- 
test mailing list
test@lists.fedoraproject.org
To unsubscribe: 
https://admin.fedoraproject.org/mailman/listinfo/test


Re: SOLVED Re: Mock for more than one config\arch?

2010-07-12 Thread Kalev Lember
On 07/12/2010 12:50 PM, Frank Murphy wrote:
> On 12/07/10 10:01, Kalev Lember wrote:
>> for ARCH in fedora-12-i386 fedora-12-x86_64 fedora-rawhide-i386 ; do
>>mock -r $ARCH mypackage.src.rpm
>> done
>>
> 
> Is it basically bash script?
> I'm not excellent currently with a cli.

Yes, it is. If it's more convenient for you, you can also put it all in one 
line:
for ARCH in fedora-12-i386 fedora-12-x86_64 fedora-rawhide-i386 ; do mock -r 
$ARCH mypackage.src.rpm ; done

-- 
Kalev
-- 
test mailing list
test@lists.fedoraproject.org
To unsubscribe: 
https://admin.fedoraproject.org/mailman/listinfo/test