Fork of Arch Linux devtools from https://git.archlinux.org/devtools.git
6d1992909c
This is inspired by the thought that went in to the delete_chroot is_subvolume commit. sync_chroot($chrootdir, $copydir) copies `$chrootdir/root` to `$copydir`. That seems a little silly; why do we care about "$chrootdir"? Have it just be sync_chroot(source, destination) like every other sync/copy command. Where this becomes tricky is check to decide if we are going to use btrfs subvolumes or not. We don't care if "$source/.." is on btrfs; the root could be a directly-mounted subvolume, but and the destination could be another subvolume of the same btrfs mounted somewhere else. The things we do care about are: - The source is a btrfs subvolume (so that we can snapshot it) - The source is on the same filesystem as the directory that the copy will be created in. - If the destination exists: * that it is not a mountpoint (so that we can delete and recreate it) * that it is a btrfs subvolume (so that we can quickly delete it) On the last point, it isn't necessary for creating the new snapshot, just for quick deletion. That can be a separate check, where we use regular `rm` for deleting the existing copy, but use subvolume snapshots for creating the new one. |
||
---|---|---|
lib | ||
.gitignore | ||
Makefile | ||
arch-nspawn.in | ||
archbuild.in | ||
archco.in | ||
archrelease.in | ||
archrm.in | ||
bash_completion.in | ||
checkpkg.in | ||
commitpkg.in | ||
crossrepomove.in | ||
find-libdeps.in | ||
finddeps.in | ||
lddd.in | ||
makechrootpkg.in | ||
makepkg-i686.conf | ||
makepkg-x86_64.conf | ||
mkarchroot.in | ||
pacman-extra.conf | ||
pacman-gnome-unstable.conf | ||
pacman-kde-unstable.conf | ||
pacman-multilib-staging.conf | ||
pacman-multilib-testing.conf | ||
pacman-multilib.conf | ||
pacman-staging.conf | ||
pacman-testing.conf | ||
rebuildpkgs.in | ||
zsh_completion.in |