chore: correct overlay lowerdir

This commit is contained in:
Rudra Saraswat 2023-05-31 17:13:03 +05:30
parent f452b75e1a
commit 339518860e
2 changed files with 8 additions and 12 deletions

View file

@ -204,10 +204,10 @@ def update_system():
exec('chmod', '-R', '755', varlibpacman_overlay_workdir)
exec('mount', '-t', 'overlay', 'overlay', '-o',
f'lowerdir=/var/lib/pacman,upperdir={usr_overlay},workdir={usr_overlay_workdir}', '/mnt/iso-update/squashfs-root/usr')
f'lowerdir=/mnt/iso-update/squashfs-root/,upperdir={usr_overlay},workdir={usr_overlay_workdir}', '/mnt/iso-update/squashfs-root/usr')
exec('mount', '-t', 'overlay', 'overlay', '-o',
f'lowerdir=/var/lib/pacman,upperdir={varlibpacman_overlay},workdir={varlibpacman_overlay_workdir}', '/mnt/iso-update/squashfs-root/var/lib/pacman')
f'lowerdir=/mnt/iso-update/squashfs-root/var/lib/pacman,upperdir={varlibpacman_overlay},workdir={varlibpacman_overlay_workdir}', '/mnt/iso-update/squashfs-root/var/lib/pacman')
# Install custom system packages
exec('touch', '/.custom_pkg_list')

View file

@ -75,17 +75,13 @@ run_latehook() {
# Handle overlays.
if [[ ! -f /new_root/mnt/iso-update/.successful-update ]]; then
if [[ -f '/new_root/.blend-overlays/future-usr/.okay' ]] && [[ -f '/new_root/.blend-overlays/future-varlibpacman/.okay' ]]; then
for i in usr varlibpacman; do
rm -rf /new_root/.blend-overlays/$i
mv /new_root/.blend-overlays/future-$i /new_root/.blend-overlays/$i
done
else
rm -rf /new_root/.blend-overlays/usr.workdir /new_root/.blend-overlays/varlibpacman.workdir
fi
if [[ -f '/new_root/.blend-overlays/future-usr/.okay' ]] && [[ -f '/new_root/.blend-overlays/future-varlibpacman/.okay' ]]; then
for i in usr varlibpacman; do
rm -rf /new_root/.blend-overlays/$i
mv /new_root/.blend-overlays/future-$i /new_root/.blend-overlays/$i
done
else
rm -rf /new_root/.blend-overlays
rm -rf /new_root/.blend-overlays/usr.workdir /new_root/.blend-overlays/varlibpacman.workdir
fi
for i in usr varlibpacman; do