🐛 fix(pacman): keep existing config file modes
- 🐛 refresh used to copy over the existing files, so a customized mode must survive the shared regional applicator too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
123535ea14
commit
647979bde7
2 files changed
+9
-2
No files matched your search
@@ -49,5 +49,6 @@ for file in pacman.conf pacman.d/mirrorlist; do
|
|||||||
cp -f "$etc/$file" "$etc/$file.bak"
|
cp -f "$etc/$file" "$etc/$file.bak"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
install -m 644 "$staging/pacman.conf" "$etc/pacman.conf"
|
# Copying over an existing file keeps its owner and mode, as refresh always has.
|
||||||
install -m 644 "$staging/mirrorlist" "$etc/pacman.d/mirrorlist"
|
cp -f "$staging/pacman.conf" "$etc/pacman.conf"
|
||||||
|
cp -f "$staging/mirrorlist" "$etc/pacman.d/mirrorlist"
|
||||||
@@ -18,6 +18,12 @@ for channel in stable rc edge; do
|
|||||||
done
|
done
|
||||||
pass "missing region preserves all global channel templates byte for byte"
|
pass "missing region preserves all global channel templates byte for byte"
|
||||||
|
|
||||||
|
chmod 600 "$TARGET_ROOT/etc/pacman.conf"
|
||||||
|
apply stable
|
||||||
|
[[ $(stat -c %a "$TARGET_ROOT/etc/pacman.conf") == 600 ]] || fail "refresh keeps a customized pacman.conf mode"
|
||||||
|
chmod 644 "$TARGET_ROOT/etc/pacman.conf"
|
||||||
|
pass "refresh keeps existing config file modes"
|
||||||
|
|
||||||
printf 'cn\n' > "$TARGET_ROOT/etc/omarchy/region"
|
printf 'cn\n' > "$TARGET_ROOT/etc/omarchy/region"
|
||||||
for channel in stable rc edge; do
|
for channel in stable rc edge; do
|
||||||
case "$channel" in
|
case "$channel" in
|
||||||
|
|||||||
Reference in new issue
Block a user