summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-06-20 17:32:31 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-23 14:26:16 +0100
commit0aa028f5a993322484e2a874efc3a40ee8e5078a (patch)
tree756a5f692e36331da9b23647e42d26e81257b856 /meta/lib
parentc844230ba9649c4a82e722cc1cc85d8258a57257 (diff)
downloadopenembedded-core-contrib-0aa028f5a993322484e2a874efc3a40ee8e5078a.tar.gz
openembedded-core-contrib-0aa028f5a993322484e2a874efc3a40ee8e5078a.tar.bz2
openembedded-core-contrib-0aa028f5a993322484e2a874efc3a40ee8e5078a.zip
oeqa/targetbuild: fix folder name estimate logic
The re.sub() used to transform a tarball into a best guess folder name wasn't right, as there isn't enough escaping and tar.xz was missing. (From OE-Core rev: ac99135b009a1066486ed2afb2f298d0a5a3a854) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/utils/targetbuild.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/targetbuild.py b/meta/lib/oeqa/utils/targetbuild.py
index d538f6b65f..6177a12eb9 100644
--- a/meta/lib/oeqa/utils/targetbuild.py
+++ b/meta/lib/oeqa/utils/targetbuild.py
@@ -17,9 +17,10 @@ class BuildProject(metaclass=ABCMeta):
self.uri = uri
self.archive = os.path.basename(uri)
self.localarchive = os.path.join(tmpdir,self.archive)
- self.fname = re.sub(r'.tar.bz2|tar.gz$', '', self.archive)
if foldername:
self.fname = foldername
+ else:
+ self.fname = re.sub(r'\.tar\.bz2$|\.tar\.gz$|\.tar\.xz$', '', self.archive)
# Download self.archive to self.localarchive
def _download_archive(self):