Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/rebuildpkgs.in
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2017-04-10 14:03:16 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2017-04-16 23:20:29 -0400
commitc9447e89cec803ed614d73c54b38d2ca7d5f0c95 (patch)
tree48a7cbf9d2839982906c9fa4ed1446f313505dc9 /rebuildpkgs.in
parent0a630629b1bda68d39c256e5d9304983fc4eb4ce (diff)
makechrootpkg: sync_chroot: Make more general.
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.
Diffstat (limited to 'rebuildpkgs.in')
0 files changed, 0 insertions, 0 deletions