From c94c7174673bb84ec85a480f67ff6b722c932467 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Mon, 20 Jan 2020 13:56:50 +0100 Subject: ptxd_lib_dgen: add helper to get deps Signed-off-by: Michael Olbrich --- scripts/lib/ptxd_lib_dgen.awk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk index dc2f13bc0..483282509 100644 --- a/scripts/lib/ptxd_lib_dgen.awk +++ b/scripts/lib/ptxd_lib_dgen.awk @@ -255,22 +255,22 @@ function write_vars_all(this_PKG) { } } -function write_maps(this_PKG, dep_type) { +function pkg_dep(this_PKG, dep_type) { if (dep_type == "R") - this_PKG_DEP = PKG_to_R_DEP[this_PKG]; + return PKG_to_R_DEP[this_PKG]; else - this_PKG_DEP = PKG_to_B_DEP[this_PKG]; + return PKG_to_B_DEP[this_PKG]; +} +function write_maps(this_PKG, dep_type) { + this_PKG_DEP = pkg_dep(this_PKG, dep_type); if (this_PKG_DEP == "") return; n = split(this_PKG_DEP, this_DEP_array, " "); for (i = 1; i <= n; i++) { if (this_DEP_array[i] in virtual_pkg) { - if (dep_type == "R") - virtual_PKG_DEP = PKG_to_R_DEP[this_DEP_array[i]]; - else - virtual_PKG_DEP = PKG_to_B_DEP[this_DEP_array[i]]; + virtual_PKG_DEP = pkg_dep(this_DEP_array[i], dep_type); this_PKG_DEP = this_PKG_DEP " " virtual_PKG_DEP } } -- cgit v1.2.3