Patchwork [14/22] python-smartpm: don't create /var/tmp on every rpm database open

login
register
mail settings
Submitter Mark Hatle
Date Dec. 4, 2012, 5:14 p.m.
Message ID <639f3340012592f7dad1ffe281308b17f8dd9940.1354641032.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/40311/
State Accepted
Commit 54d227e97ff3498fc2149f96f1ca40452ad21a32
Headers show

Comments

Mark Hatle - Dec. 4, 2012, 5:14 p.m.
From: Paul Eggleton <paul.eggleton@linux.intel.com>

This directory if present in the rootfs interferes with proper
installation of base-files and doesn't seem to need to be there
for smart/rpm to work in any case.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 .../python/python-smartpm/smart-tmpdir.patch       |   30 ++++++++++++++++++++
 .../python/python-smartpm_1.4.1.bb                 |    1 +
 2 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-tmpdir.patch

Patch

diff --git a/meta/recipes-devtools/python/python-smartpm/smart-tmpdir.patch b/meta/recipes-devtools/python/python-smartpm/smart-tmpdir.patch
new file mode 100644
index 0000000..2f09ce9
--- /dev/null
+++ b/meta/recipes-devtools/python/python-smartpm/smart-tmpdir.patch
@@ -0,0 +1,30 @@ 
+backends/rpm: remove creation of /var/tmp
+
+This doesn't appear to be needed, and breaks installation of base-files
+in OpenEmbedded (since that is a symlink installed as part of the
+package).
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+diff --git a/smart/backends/rpm/base.py b/smart/backends/rpm/base.py
+index 234c844..127354d 100644
+--- a/smart/backends/rpm/base.py
++++ b/smart/backends/rpm/base.py
+@@ -82,12 +82,6 @@ def getTS(new=False):
+             else:
+                 iface.warning(_("Initialized new rpm database at %s")
+                               % getTS.root)
+-        tmpdir = os.path.join(getTS.root, "var/tmp")
+-        if not os.path.isdir(tmpdir):
+-            try:
+-                os.makedirs(tmpdir)
+-            except OSError:
+-                pass
+     if new:
+         if sysconf.get("rpm-dbpath"):
+             rpm.addMacro('_dbpath', "/" + sysconf.get("rpm-dbpath"))
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
index 2d0f7cd..9ec7c7a 100644
--- a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
+++ b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
@@ -20,6 +20,7 @@  SRC_URI = "\
           file://smart-rpm-root.patch \
           file://smart-recommends.patch \
           file://smart-rpm-md-parse.patch \
+          file://smart-tmpdir.patch \
           "
 
 SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6"