Give the platform guard its own detector copy instead of moving it

Moving omarchy-hw-platform from omarchy to omarchy-settings loses the file
when the dev pair installs in separate transactions, since omarchy-dev does
not pin omarchy-settings-dev's version. Settings now installs a copy beside
the guard script and omarchy keeps its detector, so no file changes owner.
This commit is contained in:
Marcelo Alcantara committed 2026-09-25 20:01:13 +10:00
1 parent 0a65168b09
commit fb2ade61fc
4 files changed
+14 -24

No files matched your search

+5 -9
View File
@@ -367,20 +367,16 @@ EOF
# Pacman platform guard: refuses packages tagged for another hardware
# platform. It ships here, not in omarchy, so it is resident before the
# runtime and any hardware package install; the hook, the script it runs and
# the platform detector that script asks all travel together. omarchy leaves
# the detector out of its bin/ loop; the share/bin link keeps the Apple
# predicate's "detector beside me" lookup and the CLI router working.
# Conditional until the pinned source carries them.
if [[ -f bin/omarchy-hw-platform ]]; then
install -Dm755 bin/omarchy-hw-platform "$pkgdir/usr/bin/omarchy-hw-platform"
install -d "$pkgdir/usr/share/omarchy/bin"
ln -s /usr/bin/omarchy-hw-platform "$pkgdir/usr/share/omarchy/bin/omarchy-hw-platform"
fi
# the script's own copy of the platform detector travel together (omarchy
# keeps /usr/bin/omarchy-hw-platform). Conditional until the pinned source
# carries them.
if [[ -f default/libalpm/hooks/00-omarchy-platform-guard.hook ]]; then
install -Dm644 default/libalpm/hooks/00-omarchy-platform-guard.hook \
"$pkgdir/usr/share/libalpm/hooks/00-omarchy-platform-guard.hook"
install -Dm755 default/libalpm/scripts/omarchy-platform-guard \
"$pkgdir/usr/share/libalpm/scripts/omarchy-platform-guard"
install -Dm755 bin/omarchy-hw-platform \
"$pkgdir/usr/share/libalpm/scripts/omarchy-hw-platform"
fi
# Branding assets (logos, icons).