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

Adam Williamson awilliam at redhat.com
Mon Jul 12 19:30:10 UTC 2010


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



More information about the test mailing list