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>
This commit is contained in:
Ross Burton
2016-06-20 17:32:31 +01:00
committed by Richard Purdie
parent c844230ba9
commit 0aa028f5a9

View File

@@ -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):