mock 0.8.9

Michael E Brown Michael_E_Brown at dell.com
Mon Dec 3 20:59:26 UTC 2007


On Mon, Dec 03, 2007 at 06:45:23AM -0200, Paulo Cavalcanti wrote:
> On Dec 3, 2007 4:11 AM, Michael E Brown <Michael_E_Brown at dell.com> wrote:
> 
> > On Sun, Dec 02, 2007 at 07:22:22PM -0200, Paulo Cavalcanti wrote:
> > > I am trying to use mock 0.8.
> > >
> > > Executing a simple man mock, gives me:
> > >
> > > SYNTAX
> > >        mock  [options] --rebuild SRPM [SRPM...]
> > >
> > >        mock  [options] --chroot <cmd>
> > >
> > >        mock  [options] {--init|clean|shell}
> > >
> > >        mock  [options] --installdeps {SRPM|RPM}
> > >
> > >        mock  [options] --install PACKAGE
> > >
> > > ----------------------------------------------------------
> > >
> > > In fact,
> > >
> > > mock -r fedora-8-i386 --init
> > >
> > > does not work at all. It must be:
> > >
> > > mock -r fedora-8-i386 init
> > >
> > > Therefore, I think that an update for man mock (0.8.9) is in order,
> > right?
> > > It was this way in mock 0.7.
> >
> > This was something I overlooked and it is fixed in 0.8.10 already, which
> > should be making its way to testing repos.
> >
> 
> Thanks. I filed a bug report anyway.
> 
> Just a curiosity, what is the reason for the change?
> mock is written in python, and it would have been simpler
> to parse the arguments keeping the "--".

Actually, this was the change that was made. Old way: "rebuild", new
way: "--rebuild". I've tried to keep backwards compatibility for people
using the old method and dont intend to drop that.

> 
> Another thing is that in version 0.7 I could open a mock shell
> and check the installed rpms or install an rpm (rpm -ivh). If I try this
> in version 0.8 I get an error. I know I can use mock install outside
> the mock shell, but via shell should still work in my opinion.

It would be easier to debug given the actual error output.

New mock provides "mock --install REPOPKG" if you want to install an RPM
from one of the configured repos.

> Finally, how do I pass an argument for building via mock,
> 
> --define or --with something?

you can pass it in the .rpmmacros file by editing the mock config file.
Look in /etc/mock/defaults.cfg for information, see the
config_opts['macros'] line.

You can put this directive in the chroot config file or the defaults.cfg
file.

--
Michael




More information about the fedora-devel-list mailing list