summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-23 08:18:41 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-25 21:34:50 +0000
commitaa72758866ecb9335919bd888528b58a2b873156 (patch)
treeec7a8a6f808ffbf69338f21f122277de6aa9193b
parentfbd00df78b2458b7658b1ac787b3ac649fc88a9a (diff)
downloadpoky-aa72758866ecb9335919bd888528b58a2b873156.tar.gz
sanity: Add check for tar older than 1.28
Older versions break opkg-build when reproducible builds are enabled. Rather than trying to be selective based on which features are enabled, lets just make this a minimum version. (From OE-Core rev: 96f5c7c2f8dda7d47af5398b3463aa25921f5301) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sanity.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 705062bc86..9d0c784032 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -523,6 +523,7 @@ def check_wsl(d):
523 523
524# Tar version 1.24 and onwards handle overwriting symlinks correctly 524# Tar version 1.24 and onwards handle overwriting symlinks correctly
525# but earlier versions do not; this needs to work properly for sstate 525# but earlier versions do not; this needs to work properly for sstate
526# Version 1.28 is needed so opkg-build works correctly when reproducibile builds are enabled
526def check_tar_version(sanity_data): 527def check_tar_version(sanity_data):
527 from distutils.version import LooseVersion 528 from distutils.version import LooseVersion
528 import subprocess 529 import subprocess
@@ -532,7 +533,9 @@ def check_tar_version(sanity_data):
532 return "Unable to execute tar --version, exit code %d\n%s\n" % (e.returncode, e.output) 533 return "Unable to execute tar --version, exit code %d\n%s\n" % (e.returncode, e.output)
533 version = result.split()[3] 534 version = result.split()[3]
534 if LooseVersion(version) < LooseVersion("1.24"): 535 if LooseVersion(version) < LooseVersion("1.24"):
535 return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar.\n" 536 return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar (1.28+).\n"
537 if LooseVersion(version) < LooseVersion("1.28"):
538 return "Your version of tar is older than 1.28 and does not have the support needed to enable reproducible builds. Please install a newer version of tar (you could use the projects buildtools-tarball from our last release).\n"
536 return None 539 return None
537 540
538# We use git parameters and functionality only found in 1.7.8 or later 541# We use git parameters and functionality only found in 1.7.8 or later