Compare commits
1 commit
main
...
fix-rm-err
Author | SHA1 | Date | |
---|---|---|---|
|
825e6c8516 |
1 changed files with 12 additions and 2 deletions
12
akshara
12
akshara
|
@ -19,11 +19,15 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
import yaml
|
import yaml
|
||||||
|
import shutil
|
||||||
import filecmp
|
import filecmp
|
||||||
import argparse
|
import argparse
|
||||||
import requests
|
import requests
|
||||||
|
import platform
|
||||||
import fasteners
|
import fasteners
|
||||||
|
from threading import Event
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
__version = '1.0.0'
|
__version = '1.0.0'
|
||||||
|
@ -162,6 +166,7 @@ def update_system():
|
||||||
repo = "https://pkg-repo.blendos.co"
|
repo = "https://pkg-repo.blendos.co"
|
||||||
elif not (repo.startswith("https://") or repo.startswith("http://")):
|
elif not (repo.startswith("https://") or repo.startswith("http://")):
|
||||||
repo = "https://" + repo
|
repo = "https://" + repo
|
||||||
|
|
||||||
if not os.path.isfile('/.update.tar.zst'):
|
if not os.path.isfile('/.update.tar.zst'):
|
||||||
if exec('wget', '-q', '--show-progress', f'{bootstrap_repo}/iso/latest/archlinux-bootstrap-x86_64.tar.zst', '-O', '/.update.tar.zst') != 0:
|
if exec('wget', '-q', '--show-progress', f'{bootstrap_repo}/iso/latest/archlinux-bootstrap-x86_64.tar.zst', '-O', '/.update.tar.zst') != 0:
|
||||||
warn('failed download')
|
warn('failed download')
|
||||||
|
@ -219,6 +224,10 @@ def update_system():
|
||||||
'blend-files'
|
'blend-files'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
keep = [
|
||||||
|
'/usr/share'
|
||||||
|
]
|
||||||
|
|
||||||
if (type(blend_release.get('impl')) == str and
|
if (type(blend_release.get('impl')) == str and
|
||||||
type(blend_release.get('track')) != 'custom'):
|
type(blend_release.get('track')) != 'custom'):
|
||||||
res = interpret_track(blend_release)
|
res = interpret_track(blend_release)
|
||||||
|
@ -430,6 +439,7 @@ Server = {package_repo["repo-url"]}
|
||||||
exec('cp', '-ax', '/.new_rootfs/var/lib/pacman', '/.new.var.lib/pacman')
|
exec('cp', '-ax', '/.new_rootfs/var/lib/pacman', '/.new.var.lib/pacman')
|
||||||
|
|
||||||
exec('mv', '.new_rootfs', '.update_rootfs')
|
exec('mv', '.new_rootfs', '.update_rootfs')
|
||||||
|
exec('cp', '-ax', '/.update_rootfs/etc', '/.update_rootfs/usr/etc')
|
||||||
|
|
||||||
new_boot_files = []
|
new_boot_files = []
|
||||||
|
|
||||||
|
@ -520,7 +530,7 @@ except:
|
||||||
# remove update and akshara stuff if the program errors (either exited by the user or an error) and is updating
|
# remove update and akshara stuff if the program errors (either exited by the user or an error) and is updating
|
||||||
if command == update_system and not args.keep_files_on_error:
|
if command == update_system and not args.keep_files_on_error:
|
||||||
exec('umount', '-rf', '/.new_rootfs/')
|
exec('umount', '-rf', '/.new_rootfs/')
|
||||||
exec('rmdir', '/.new_rootfs/')
|
exec('rm', '-rf', '/.new_rootfs/')
|
||||||
exec('rm', '-rf', '/.update_rootfs')
|
exec('rm', '-rf', '/.update_rootfs')
|
||||||
exec('rm', '-f', '/.update')
|
exec('rm', '-f', '/.update')
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue