diff options
| -rw-r--r-- | meta/classes-global/sanity.bbclass | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass index 15067e78d3..606444cae1 100644 --- a/meta/classes-global/sanity.bbclass +++ b/meta/classes-global/sanity.bbclass | |||
| @@ -504,6 +504,14 @@ def check_tar_version(sanity_data): | |||
| 504 | version = result.split()[3] | 504 | version = result.split()[3] |
| 505 | if bb.utils.vercmp_string_op(version, "1.28", "<"): | 505 | if bb.utils.vercmp_string_op(version, "1.28", "<"): |
| 506 | 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 project's buildtools-tarball from our last release or use scripts/install-buildtools).\n" | 506 | 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 project's buildtools-tarball from our last release or use scripts/install-buildtools).\n" |
| 507 | |||
| 508 | try: | ||
| 509 | result = subprocess.check_output(["tar", "--help"], stderr=subprocess.STDOUT).decode('utf-8') | ||
| 510 | if "--xattrs" not in result: | ||
| 511 | return "Your tar doesn't support --xattrs, please use GNU tar.\n" | ||
| 512 | except subprocess.CalledProcessError as e: | ||
| 513 | return "Unable to execute tar --help, exit code %d\n%s\n" % (e.returncode, e.output) | ||
| 514 | |||
| 507 | return None | 515 | return None |
| 508 | 516 | ||
| 509 | # We use git parameters and functionality only found in 1.7.8 or later | 517 | # We use git parameters and functionality only found in 1.7.8 or later |
