Fork of Arch Linux devtools from https://git.archlinux.org/devtools.git
Go to file
Luke Shumaker 6d1992909c
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.
2017-07-05 18:21:55 +02:00
lib makechrootpkg: sync_chroot: Make more general. 2017-07-05 18:21:55 +02:00
.gitignore Update .gitignore 2013-05-25 22:17:30 +02:00
Makefile Version 20170320 2017-03-20 19:23:50 +01:00
arch-nspawn.in mkarchroot, arch-nspawn: Add an `-s` flag to inhibit `setarch`. 2017-04-05 22:17:51 +02:00
archbuild.in Avoid using string interpolation; use printf format strings instead. 2017-04-05 22:11:16 +02:00
archco.in Avoid using string interpolation; use printf format strings instead. 2017-04-05 22:11:16 +02:00
archrelease.in Avoid using string interpolation; use printf format strings instead. 2017-04-05 22:11:16 +02:00
archrm.in Add a "License:" tag to all code files. 2017-04-05 22:10:03 +02:00
bash_completion.in Add a "License:" tag to all code files. 2017-04-05 22:10:03 +02:00
checkpkg.in Handle makepkg.conf more consistently 2017-04-05 22:17:51 +02:00
commitpkg.in Handle makepkg.conf more consistently 2017-04-05 22:17:51 +02:00
crossrepomove.in Avoid using string interpolation; use printf format strings instead. 2017-04-05 22:11:16 +02:00
find-libdeps.in Add a "License:" tag to all code files. 2017-04-05 22:10:03 +02:00
finddeps.in Add a "License:" tag to all code files. 2017-04-05 22:10:03 +02:00
lddd.in Avoid using string interpolation; use printf format strings instead. 2017-04-05 22:11:16 +02:00
makechrootpkg.in makechrootpkg: sync_chroot: Make more general. 2017-07-05 18:21:55 +02:00
makepkg-i686.conf Sync makepkg.conf files with pacman 5.0.2-2 2017-07-04 12:04:51 +02:00
makepkg-x86_64.conf Sync makepkg.conf files with pacman 5.0.2-2 2017-07-04 12:04:51 +02:00
mkarchroot.in mkarchroot: Don't let the environment affect pacstrap (sans proxy settings). 2017-04-05 22:17:51 +02:00
pacman-extra.conf Update bundled pacman and makepkg configuration 2016-02-07 10:12:56 +01:00
pacman-gnome-unstable.conf Update bundled pacman and makepkg configuration 2016-02-07 10:12:56 +01:00
pacman-kde-unstable.conf Update bundled pacman and makepkg configuration 2016-02-07 10:12:56 +01:00
pacman-multilib-staging.conf Update bundled pacman and makepkg configuration 2016-02-07 10:12:56 +01:00
pacman-multilib-testing.conf Update bundled pacman and makepkg configuration 2016-02-07 10:12:56 +01:00
pacman-multilib.conf Update bundled pacman and makepkg configuration 2016-02-07 10:12:56 +01:00
pacman-staging.conf Update bundled pacman and makepkg configuration 2016-02-07 10:12:56 +01:00
pacman-testing.conf Update bundled pacman and makepkg configuration 2016-02-07 10:12:56 +01:00
rebuildpkgs.in Handle makepkg.conf more consistently 2017-04-05 22:17:51 +02:00
zsh_completion.in Add a "License:" tag to all code files. 2017-04-05 22:10:03 +02:00