diff options
author | Changqing Li <changqing.li@windriver.com> | 2019-01-17 17:49:05 +0800 |
---|---|---|
committer | Joshua Watt <JPEWhacker@gmail.com> | 2019-05-05 13:45:36 -0500 |
commit | d17724b0eac76792a49e56213cba74e32edba48f (patch) | |
tree | eb639585ff3e4ed97f5d03d86f8207cf978f1094 | |
parent | 10695afe8cd406844e0d0dd868c11677e07557d4 (diff) | |
download | meta-mingw-d17724b0eac76792a49e56213cba74e32edba48f.tar.gz |
testsdk: enhance extract sdk part2.8_M1
Current sdk type is tar.xz, but for mingw sdk, since we
have symlink under the sdk folder, 7zip which used to
extract tar.xz cannot handle it, refer 7zip upstream bug:
https://sourceforge.net/p/sevenzip/discussion/45797/thread/c71d6b96/
so oe-core have add support of change SDK type to .zip, so correct
the extract function.
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
-rw-r--r-- | lib/oeqa/sdkmingw/testsdk.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/oeqa/sdkmingw/testsdk.py b/lib/oeqa/sdkmingw/testsdk.py index 85fe3c6..173cfd9 100644 --- a/lib/oeqa/sdkmingw/testsdk.py +++ b/lib/oeqa/sdkmingw/testsdk.py | |||
@@ -12,7 +12,7 @@ class TestSDKMinGW(TestSDK): | |||
12 | """ | 12 | """ |
13 | Get the name of the SDK file | 13 | Get the name of the SDK file |
14 | """ | 14 | """ |
15 | return d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.xz") | 15 | return d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}") |
16 | 16 | ||
17 | def extract_sdk(self, tcname, sdk_dir, d): | 17 | def extract_sdk(self, tcname, sdk_dir, d): |
18 | """ | 18 | """ |
@@ -23,7 +23,14 @@ class TestSDKMinGW(TestSDK): | |||
23 | try: | 23 | try: |
24 | # TODO: It would be nice to try and extract the SDK in Wine to make | 24 | # TODO: It would be nice to try and extract the SDK in Wine to make |
25 | # sure it is well formed | 25 | # sure it is well formed |
26 | subprocess.check_output(['tar', '-xf', tcname, '-C', sdk_dir]) | 26 | |
27 | # TODO: Extract SDK according to SDK_ARCHIVE_TYPE, need to change if | ||
28 | # oe-core support other types. | ||
29 | if d.getVar("SDK_ARCHIVE_TYPE") == "zip": | ||
30 | subprocess.check_output(['unzip', '-d', sdk_dir, tcname]) | ||
31 | else: | ||
32 | subprocess.check_output(['tar', '-xf', tcname, '-C', sdk_dir]) | ||
33 | |||
27 | except subprocess.CalledProcessError as e: | 34 | except subprocess.CalledProcessError as e: |
28 | bb.fatal("Couldn't install the SDK:\n%s" % e.output.decode("utf-8")) | 35 | bb.fatal("Couldn't install the SDK:\n%s" % e.output.decode("utf-8")) |
29 | 36 | ||