]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/targetbuild: fix folder name estimate logic
authorRoss Burton <ross.burton@intel.com>
Mon, 20 Jun 2016 16:32:31 +0000 (17:32 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 23 Jun 2016 13:23:29 +0000 (14:23 +0100)
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.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/utils/targetbuild.py

index d538f6b65f1f6168ec9c81c43b8fa71d490d7ebe..6177a12eb9b22f319b06273ed0649d8cf4a7f032 100644 (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):