Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2019-04-11 20:31:32 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2019-04-11 20:31:32 +0200
commite932d6fe886709312eea732d3fa3de3cb93786ba (patch)
treecc6f62e8d2888c5dc2d636868b2a8babb5c01b73
parent3863691b49ebf296eafbb1bf47487d9366dbb671 (diff)
Trying to fix auto-git-update
-rw-r--r--archinstall.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/archinstall.py b/archinstall.py
index cc97328a..23d39d02 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -193,11 +193,12 @@ class sys_command():
def update_git():
default_gw = get_default_gateway_linux()
if(default_gw):
+ print('[N] Updating git!')
## Not the most elegant way to make sure git conflicts doesn't occur (yea fml)
os.remove('/root/archinstall/archinstall.py')
os.remove('/root/archinstall/README.md')
- output = b''.join(sys_command('(cd /root/archinstall; git fetch --all)').exec()) # git reset --hard origin/<branch_name>
+ output = b''.join(sys_command('(cd /root/archinstall; git update)').exec()) # git reset --hard origin/<branch_name>
if b'error:' in output:
print('[N] Could not update git source for some reason.')
@@ -209,7 +210,8 @@ def update_git():
num_changes = int(tmp[0].split(b' ',1)[0])
if(num_changes):
## Reboot the script (in same context)
- os.execv('/usr/bin/python3', ['archinstall.py', 'archinstall.py'] + sys.argv[1:])
+ print('[N] Rebooting the script')
+ os.execv('/usr/bin/python3', ['archinstall.py'] + sys.argv)
def device_state(name):
# Based out of: https://askubuntu.com/questions/528690/how-to-get-list-of-all-non-removable-disk-device-names-ssd-hdd-and-sata-ide-onl/528709#528709
@@ -236,6 +238,8 @@ def grab_partitions(dev):
## TODO: Replace o = sys_command() with code, o = sys_command()
## and make sys_command() return the exit-code, way safer than checking output strings :P
return {}
+
+ print(o)
r = json.loads(o.decode('UTF-8'))
if len(r['blockdevices']) and 'children' in r['blockdevices'][0]:
for part in r['blockdevices'][0]['children']: