Skip to contentSkip to conversation

oeqa/buildproject: Ensure temp directories are cleaned up

PATCH New Richard Purdie 1 participant 2 messages Sep 25, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 oeqa/buildproject: Ensure temp directories are cleaned up

---
 meta/lib/oeqa/utils/buildproject.py | 3 +++
 meta/lib/oeqa/utils/targetbuild.py  | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
meta/lib/oeqa/utils/buildproject.py +3 -0
index e6d80cc8dc1..dfb96618680 100644
@@ -18,6 +18,7 @@ class BuildProject(metaclass=ABCMeta):
     def __init__(self, uri, foldername=None, tmpdir=None, dl_dir=None):
         self.uri = uri
         self.archive = os.path.basename(uri)
+        self.tempdirobj = None
         if not tmpdir:
             self.tempdirobj = tempfile.TemporaryDirectory(prefix='buildproject-')
             tmpdir = self.tempdirobj.name
@@ -57,6 +58,8 @@ class BuildProject(metaclass=ABCMeta):
         return self._run('cd %s; make install %s' % (self.targetdir, install_args))
 
     def clean(self):
+        if self.tempdirobj:
+            self.tempdirobj.cleanup()
         if not self.needclean:
              return
         self._run('rm -rf %s' % self.targetdir)
meta/lib/oeqa/utils/targetbuild.py +3 -1
index 1055810ca33..09738add1d9 100644
@@ -19,6 +19,7 @@ class BuildProject(metaclass=ABCMeta):
         self.d = d
         self.uri = uri
         self.archive = os.path.basename(uri)
+        self.tempdirobj = None
         if not tmpdir:
             tmpdir = self.d.getVar('WORKDIR')
             if not tmpdir:
@@ -71,9 +72,10 @@ class BuildProject(metaclass=ABCMeta):
         return self._run('cd %s; make install %s' % (self.targetdir, install_args))
 
     def clean(self):
+        if self.tempdirobj:
+            self.tempdirobj.cleanup()
         self._run('rm -rf %s' % self.targetdir)
         subprocess.check_call('rm -f %s' % self.localarchive, shell=True)
-        pass
 
 class TargetBuildProject(BuildProject):
 
Signature · 1 line
2.32.0
#1 lore raw

PATCH 2/2 packagegroup-core-tools-profile: Exclude systemtap from riscv32 as well

The recipe can't be built for riscv32 so exclude it alongside riscv64.

---
 .../packagegroups/packagegroup-core-tools-profile.bb             | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +1 -0
index 663a9cd57bf..84eb46b9c21 100644
@@ -36,6 +36,7 @@ SYSTEMTAP = "systemtap"
 SYSTEMTAP:libc-musl = ""
 SYSTEMTAP:nios2 = ""
 SYSTEMTAP:riscv64 = ""
+SYSTEMTAP:riscv32 = ""
 
 LTTNGTOOLS = "lttng-tools"
 LTTNGTOOLS:arc = ""
Signature · 1 line
2.32.0