[arch-general] archroot - proper way to Start Over? (rm -r $CHROOT/$USER)?

C Anthony Risinger anthony at xtfx.me
Fri Mar 2 17:48:43 EST 2012


On Fri, Mar 2, 2012 at 4:31 PM, David C. Rankin
<drankinatty at suddenlinkmail.com> wrote:
>
> Guys,
>
>  What is the best way to clean a chroot without doing another mkarchroot?
>
>  In the chroot I have /root and /david. With Trinity there are 2 different Qt
> dependencies that can be used Qt3 and TQt3. I have built a set of packages on
> Qt3, not I want to rebuild starting with TQt3. I don't want any stray dependency
> mismatches, so I want to start with a fresh chroot.
>
>  I know I can just save my [local] repo and blow away the whole chroot and
> start over, but can I do just as well by deleting /david and then build my first
> package? Or, is it better to just start over with mkarchoot?

IIRC makechrootpkg used to create an overlay/union before starting,
which would keep your original root intact.  if you put your builds on
a btrfs filesystem i believe makechrootpkg will snapshot the fs before
starting (i know im mixing mkarchroot and makechrootpkg a bit here
...)

imo, the most effective way is to use an overlay.  this FUSE based one
work just fine:

http://podgorny.cz/unionfs-fuse/releases/

... as do many other methods (DM, btrfs, overlayfs, unionfs, etc etc),
though i persoanlly like the FUSE impl because it can cope with stuff
better without less risk of crashing.  you can then use --bind mounts
or multiple overlays to do interesting things too.

make sure you've enabled `ccache` in your /etc/makepkg.conf, and
adjusted your `-jN` makeflag to an appropriate number.  i keep a 10GiB
cache around; i can blow away the webkit tree and start completely
fresh, apply my in-progress patchsets, and have a working package in
~2 minutes (normally a 3+hr build).

-- 

C Anthony


More information about the arch-general mailing list