Don't warn if ownership changes when copying /etc/pacman.d/gnupg
In an unshare environment, /etc/pacman.d/gnupg is owned by the original root, who is now "nobody". cp will warn about this, since we can't create files owned by the original root, and it instead creates them as the unshare'd root (the original user). This is benign, so ignore it.
This commit is contained in:
parent
bb04ab435a
commit
88c0c9db0b
@ -107,7 +107,7 @@ chroot_setup "$newroot" || die "failed to setup chroot %s" "$newroot"
|
||||
if (( copykeyring )); then
|
||||
# if there's a keyring on the host, copy it into the new root, unless it exists already
|
||||
if [[ -d /etc/pacman.d/gnupg && ! -d $newroot/etc/pacman.d/gnupg ]]; then
|
||||
cp -a /etc/pacman.d/gnupg "$newroot/etc/pacman.d/"
|
||||
cp -a --no-preserve=ownership /etc/pacman.d/gnupg "$newroot/etc/pacman.d/"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user