Mock fails when /var/cache/mock is bind-mounted.

Björn Persson bjorn at xn--rombobjrn-67a.se
Sun Feb 13 18:38:11 UTC 2011


Ville Skyttä wrote:
> On 02/13/2011 07:00 PM, Björn Persson wrote:
> > Is there any particular reason why Mock can't work when /var/cache/mock
> > is bind-mounted?
> > 
> > I have a relatively small flash drive for the root filesystem and a big
> > disk mounted on /disk/data. To avoid filling the flash drive I
> > bind-mounted /disk/data/mock on /var/cache/mock. When I run "fedpkg
> > mockbuild", Mock fails because
> > /var/cache/mock/fedora-rawhide-x86_64/yum_cache doesn't exist.
> 
> I have a similar setup as yours plus I bind-mount /var/lib/mock too, and
> it has always worked fine for me (current mock git, F-14).  I have never
> tried "fedpkg mockbuild", but I do use plain mock for building quite a bit.
> 
> Have you tried plain mock --rebuild /path/to/something.src.rpm?

That gives me:
ERROR: Could not find required config file: /etc/mock/default.cfg
ERROR:   Did you forget to specify the chroot to use with '-r'?
but if I try the same command that fedpkg runs, that is "mock -r fedora-devel-
x86_64 --resultdir /home/beorn/fedora-
git/GtkAda/GtkAda/2.22.0/0.0.trunk.1.fc15 --rebuild /home/beorn/fedora-
git/GtkAda/GtkAda-2.22.0-0.0.trunk.1.fc15.src.rpm", then it fails in the same 
way.

> Does mock --verbose output anything interesting?

Well, it outputs the error message to the terminal so I don't have to look in 
root.log. That's more convenient, but there's no new information.

The command that fails is "mount -n --bind /var/cache/mock/fedora-rawhide-
x86_64/yum_cache/  /var/lib/mock/fedora-rawhide-x86_64/root/var/cache/yum". 
Mount complains that /var/cache/mock/fedora-rawhide-x86_64/yum_cache/ doesn't 
exist, and returns 32.

Björn Persson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20110213/8929d125/attachment.bin 


More information about the devel mailing list