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 <jo@mein.io>
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',