From ad4b66830a6198a9920570380f673f547a488c2f Mon Sep 17 00:00:00 2001 From: Eli Schwartz via arch-projects Date: Thu, 9 May 2019 22:58:26 -0400 Subject: Revert "makechrootpkg: sync_chroot: Make more general." This reverts commit 6d1992909cc46e293027ff488ae2632047603e66. It has never worked. In commit c86823a2d4a4152c71faa1c3bab227756232996f it was noted that it compared the device numbers for [[ $1 = $1 ]] which was a useless check and always returned true, for *any* btrfs filesystem. Now that the function is corrected to compare [[ $1 = $2 ]] the check is still useless, but this time because it always returns false -- btrfs subvolumes on the same filesystem do *not* share device numbers. So let's go back to the original working implementation that only matters in terms of makechrootpkg, and just checks if makechrootpkg's root working directory is btrfs (in which case we know it will be a subvolume because mkarchroot will create it that way). This restores our special support for the btrfs filesystem. Signed-off-by: Eli Schwartz --- lib/archroot.sh | 8 -------- 1 file changed, 8 deletions(-) (limited to 'lib') diff --git a/lib/archroot.sh b/lib/archroot.sh index 2c03c82..06d4519 100644 --- a/lib/archroot.sh +++ b/lib/archroot.sh @@ -37,14 +37,6 @@ is_subvolume() { [[ -e "$1" && "$(stat -f -c %T "$1")" == btrfs && "$(stat -c %i "$1")" == 256 ]] } -## -# usage : is_same_fs( $path_a, $path_b ) -# return : whether $path_a and $path_b are on the same filesystem -## -is_same_fs() { - [[ "$(stat -c %d "$1")" == "$(stat -c %d "$2")" ]] -} - ## # usage : subvolume_delete_recursive( $path ) # -- cgit v1.2.3-70-g09d2