From c17b550cacb20b1fcfe6192f97eefa947a8e92a2 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 18 Jul 2019 15:30:31 +0200 Subject: [PATCH] phase2: sanitize SDK host command symlinks The SDK archive might contain symlinks like staging_dir/host/bin/gcc -> /builder/arc770_generic/ccache_cc.sh which may result in host compile failures when a slave has been used for both phase1 and phase2 builds. Add a new step which purges such links when running the SDK until buildroot is eventually fixed to not put suhc links into the archive in the first place. Signed-off-by: Jo-Philipp Wich --- phase2/master.cfg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phase2/master.cfg b/phase2/master.cfg index 6b8214b..74fc9b4 100644 --- a/phase2/master.cfg +++ b/phase2/master.cfg @@ -353,6 +353,12 @@ for arch in arches: command = "rsync --checksum -av sdk_update/ sdk/ && rm -rf sdk_update", haltOnFailure = True)) + factory.addStep(ShellCommand( + name = "cleancmdlinks", + description = "Sanitizing host command symlinks", + command = "sdk/staging_dir/host/bin/ -type l -exec sh -c 'case $(readlink {}) in /bin/*|/usr/bin/*) true;; /*) rm -vf {};; esac' \\;", + haltOnFailure = True)) + factory.addStep(StringDownload( name = "writeversionmk", s = 'TOPDIR:=${CURDIR}\n\ninclude $(TOPDIR)/include/version.mk\n\nversion:\n\t@echo $(VERSION_NUMBER)\n', -- 2.30.2