From d56ac2929ede93218f4542b2cc6cf478d0b20a7a Mon Sep 17 00:00:00 2001 From: Dennis ten Hoove Date: Sun, 2 Jun 2024 23:01:31 +0200 Subject: [PATCH] pacman wrapper detect fakeroot --- .../arkanelinux/overlay/post_install/usr/local/bin/pacman | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arkdep-build.d/arkanelinux/overlay/post_install/usr/local/bin/pacman b/arkdep-build.d/arkanelinux/overlay/post_install/usr/local/bin/pacman index 890f48d..3b9be75 100755 --- a/arkdep-build.d/arkanelinux/overlay/post_install/usr/local/bin/pacman +++ b/arkdep-build.d/arkanelinux/overlay/post_install/usr/local/bin/pacman @@ -5,8 +5,10 @@ if [[ ! $EUID -eq 0 ]]; then exit 1 fi -# If -r is defined do not check, we may be running pacstrap -if [[ ! $@ =~ (-r|--root) ]]; then +[[ $@ =~ (-r|--root) ]] && no_check=1 # Do not check if custom root is defined +[[ $LD_LIBRARY_PATH =~ (libfakeroot) ]] && no_check=1 # Do not check if running as fakeroot + +if [[ ! $no_check ]]; then # Check if the disk is ro'ed using subvolume properties if btrfs property get / 2> /dev/null | grep -q 'ro=true'; then cat <<- END @@ -28,4 +30,3 @@ fi # No exit statement here, we return pacman's exit code /usr/bin/pacman $@ -