Update perms for future overlays

This commit is contained in:
Rudra Saraswat 2023-05-09 12:14:28 +05:30
parent 5e4d2103a4
commit 85e8fe8386

View file

@ -225,24 +225,24 @@ def handle_system_packages(operation):
exec('rm', '-rf', f'/mnt/{old_overlay}')
usr_overlay = subprocess.run(
['mktemp', '-d', '/mnt/.blend-tmp-overlay-XXXXXXXXXXXXX'], stdout=subprocess.PIPE).stdout.decode().strip()
exec('chmod', '=rw', usr_overlay)
exec('chmod', '-R', '755', usr_overlay)
if os.path.isdir('/.blend-overlays/future-usr'):
exec('rm', '-f', '/.blend-overlays/future-usr/.okay')
exec('rm', '-rf', usr_overlay)
exec('mv', '/.blend-overlays/future-usr', usr_overlay)
usr_overlay_workdir = subprocess.run(
['mktemp', '-d', '/mnt/.blend-tmp-overlay-XXXXXXXXXXXXX'], stdout=subprocess.PIPE).stdout.decode().strip()
exec('chmod', '=rw', usr_overlay_workdir)
exec('chmod', '-R', '755', usr_overlay_workdir)
varlibpacman_overlay = subprocess.run(
['mktemp', '-d', '/mnt/.blend-tmp-overlay-XXXXXXXXXXXXX'], stdout=subprocess.PIPE).stdout.decode().strip()
exec('chmod', '=rw', varlibpacman_overlay)
exec('chmod', '-R', '755', varlibpacman_overlay)
if os.path.isdir('/.blend-overlays/future-varlibpacman'):
exec('rm', '-f', '/.blend-overlays/future-varlibpacman/.okay')
exec('rm', '-rf', varlibpacman_overlay)
exec('mv', '/.blend-overlays/future-varlibpacman', varlibpacman_overlay)
varlibpacman_overlay_workdir = subprocess.run(
['mktemp', '-d', '/mnt/.blend-tmp-overlay-XXXXXXXXXXXXX'], stdout=subprocess.PIPE).stdout.decode().strip()
exec('chmod', '=rw', varlibpacman_overlay_workdir)
exec('chmod', '-R', '755', varlibpacman_overlay_workdir)
if '' in (usr_overlay, usr_overlay_workdir, varlibpacman_overlay, varlibpacman_overlay_workdir):
for old_overlay in os.listdir('/mnt'):
if old_overlay.startswith('.blend-tmp-overlay-'):