Gentoo Archives: gentoo-user

From: Albert Hopkins <marduk@×××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] messagebus keeps 0wning my files [SOLVED]
Date: Wed, 23 Jun 2010 03:07:20
Message-Id: 1277260869.292607.32.camel@paska
In Reply to: [gentoo-user] messagebus keeps 0wning my files by Albert Hopkins
1 Well this was interesting...
3 One thing that mercurial does is if you clone a repo and the target
4 directory is on the same filesystem as the source, it create hardlinks
5 of files on the destination for efficiency. Well this is fine, but...
7 One of the things my project does is create a virtual appliance of
8 itself, and how it does that is it creates a chroot, installs gentoo,
9 installs itself, and then copies the chroot to a disk image. Well, this
10 happens on the same filesystem (as root) and in the appliance-making
11 process a user is created in the chroot and also the rep is cloned
12 inside the chroot and chowned to that user. Well the first regular uid
13 is 1000 and since "hg clone" was making symlinks, my repo got ownership
14 changed to the user inside the chroot :|
16 So the fix is to use "hg clone" with the "--pull" option to prevent
17 mercurial from creating hard links.