Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2019-11-18 23:42:04 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2019-11-18 23:42:04 +0000
commit4f394d40ceddb5d9c9de7a11b2dc1efeaf2ad19f (patch)
tree68d0f359c397a5da994c05d57ffa56bda4ff9783 /archinstall.py
parent03ceef69f17897b0f725bb29ce1ac3206d7e4c8e (diff)
mismatch between archinstall and archinstall_gui in the worker class
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py39
1 files changed, 30 insertions, 9 deletions
diff --git a/archinstall.py b/archinstall.py
index 41e67c3a..9cf7246a 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -370,17 +370,38 @@ class sys_command():#Thread):
worker_history[self.worker_id] = self.dump()
- if 'dependency' in self.kwargs and self.exit_code == 0:
- ## If this had a dependency waiting,
- ## Start it since there's no hook for this yet, the worker has to spawn it's waiting workers.
- module = self.kwargs['dependency']['module']
- print(self.cmd[0],'fullfills a dependency:', module)
- dependency_id = self.kwargs['dependency']['id']
- dependencies[module][dependency_id]['fullfilled'] = True
- dependencies[module][dependency_id]['spawn'](*dependencies[module][dependency_id]['args'], **dependencies[module][dependency_id]['kwargs'], start_callback=_worker_started_notification)
+ if 'dependency' in self.kwargs:
+ pass # TODO: Not yet supported (steal it from archinstall_gui)
+ """
+ dependency = self.kwargs['dependency']
+ if type(dependency) == str:
+ # Dependency is a progress-string. Wait for it to show up.
+ while main and main.isAlive() and dependency not in progress or progress[dependency] is None:
+ time.sleep(0.25)
+ dependency = progress[dependency]
+
+ if type(dependency) == str:
+ log(f"{self.func} waited for progress {dependency} which never showed up. Aborting.", level=2, origin='worker', function='run')
+ self.ended = time.time()
+ self.status = 'aborted'
+ return None
+
+ while main and main.isAlive() and dependency.ended is None:
+ time.sleep(0.25)
+
+ print(' *** Dependency released for:', self.func)
+
+ if dependency.data is None or not main or not main.isAlive():
+ log('Dependency:', dependency.func, 'did not exit clearly. There for,', self.func, 'can not execute.', level=2, origin='worker', function='run')
+ self.ended = time.time()
+ self.status = 'aborted'
+ return None
+ """
if self.callback:
- self.callback(self, *self.args, **self.kwargs)
+ pass # TODO: Not yet supported (steal it from archinstall_gui)
+
+ #self.callback(self, *self.args, **self.kwargs)
def get_drive_from_uuid(uuid):
if len(harddrives) <= 0: raise ValueError("No hard drives to iterate in order to find: {}".format(uuid))