[OE-core] [PATCH 1/3] oeqa/targetbuild: fix folder name estimate logic

Ross Burton ross.burton at intel.com
Mon Jun 20 16:40:52 UTC 2016


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 at intel.com>
---
 meta/lib/oeqa/utils/targetbuild.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/utils/targetbuild.py b/meta/lib/oeqa/utils/targetbuild.py
index d538f6b..6177a12 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):
-- 
2.8.1



More information about the Openembedded-core mailing list