From 5b9c7a0dc6c58f67b7adfe6cb73fec0b55a1f025 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 6 Jan 2016 23:03:39 +0100 Subject: move some functions further below --- job-cfg/chroot-installation.yaml.py | 51 ++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 23 deletions(-) (limited to 'job-cfg') diff --git a/job-cfg/chroot-installation.yaml.py b/job-cfg/chroot-installation.yaml.py index ea0aec2a..a5e5b534 100755 --- a/job-cfg/chroot-installation.yaml.py +++ b/job-cfg/chroot-installation.yaml.py @@ -95,28 +95,6 @@ def is_target_in_distro(distro, target): return False return True -# -# return the list of targets, filtered to be those present in 'distro' -# -def get_targets_in_distro(distro): - return [t for t in all_targets if is_target_in_distro(distro, t)] - -# -# given a target, returns a list of ([dist], key) tuples, so we can handle the -# edu packages having views that are distro dependant -# -# this groups all the distros that have matching views -# -def get_dists_per_key(target,get_distro_key): - dists_per_key = {} - for distro in base_distros: - if is_target_in_distro(distro, target): - key = get_distro_key(distro) - if key not in dists_per_key.keys(): - dists_per_key[key] = [] - dists_per_key[key].append(distro) - return dists_per_key - # # who gets mail for which target # @@ -172,6 +150,10 @@ def get_spoken_name(target): else: return target +# +# nothing to edit below +# + # # This structure contains the differences between the default, upgrade and upgrade_apt+dpkg_first jobs # @@ -199,9 +181,32 @@ jobspecs = [ }, ] +# some functions first… + # -# nothing to edit below +# return the list of targets, filtered to be those present in 'distro' +# +def get_targets_in_distro(distro): + return [t for t in all_targets if is_target_in_distro(distro, t)] + +# +# given a target, returns a list of ([dist], key) tuples, so we can handle the +# edu packages having views that are distro dependant +# +# this groups all the distros that have matching views # +def get_dists_per_key(target,get_distro_key): + dists_per_key = {} + for distro in base_distros: + if is_target_in_distro(distro, target): + key = get_distro_key(distro) + if key not in dists_per_key.keys(): + dists_per_key[key] = [] + dists_per_key[key].append(distro) + return dists_per_key + + +# main… data = [] jobs = [] -- cgit v1.2.3-70-g09d2