index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds+github@gmail.com> | 2019-11-18 23:42:04 +0000 |
---|---|---|
committer | Anton Hvornum <anton.feeds+github@gmail.com> | 2019-11-18 23:42:04 +0000 |
commit | 4f394d40ceddb5d9c9de7a11b2dc1efeaf2ad19f (patch) | |
tree | 68d0f359c397a5da994c05d57ffa56bda4ff9783 /archinstall.py | |
parent | 03ceef69f17897b0f725bb29ce1ac3206d7e4c8e (diff) |
-rw-r--r-- | archinstall.py | 39 |
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)) |