summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2014-03-28 12:10:43 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-28 11:01:32 +0000
commit12e300f0af2a27c15d80298d3fbb27b092c35154 (patch)
treebc5e413e04fb8de148928aab0fd46a4601bfd7bb
parent09e8cd6f09284ad3faf0bc05d623a43e2b174866 (diff)
downloadopenembedded-core-12e300f0af2a27c15d80298d3fbb27b092c35154.tar.gz
openembedded-core-12e300f0af2a27c15d80298d3fbb27b092c35154.tar.bz2
openembedded-core-12e300f0af2a27c15d80298d3fbb27b092c35154.zip
package_manager.py: leave the __db.00* files in place
Do not delete the __db.00* files in the PackageManager class. Leave this operation up to the client classes. One side effect of this deletion was the following message appearing in the output of the next rpm command executed: rpmdb: BDB1540 configured environment flags incompatible with existing environment We might also gain some time here by not deleting/creating those files very often. [YOCTO #6049] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/package_manager.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 764ab72d2c..a8360fe983 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -299,9 +299,6 @@ class RpmPkgsList(PkgsList):
# bb.note(cmd)
tmp_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip()
- rpm_db_locks = glob.glob('%s/var/lib/rpm/__db.*' % self.rootfs_dir)
- for f in rpm_db_locks:
- bb.utils.remove(f, True)
except subprocess.CalledProcessError as e:
bb.fatal("Cannot get the installed packages list. Command '%s' "
"returned %d:\n%s" % (cmd, e.returncode, e.output))
@@ -1101,7 +1098,6 @@ class RpmPM(PackageManager):
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip()
bb.note(output)
os.chmod(saved_dir, 0755)
- self._unlock_rpm_db()
except subprocess.CalledProcessError as e:
bb.fatal("Invoke save_rpmpostinst failed. Command '%s' "
"returned %d:\n%s" % (cmd, e.returncode, e.output))
@@ -1117,14 +1113,12 @@ class RpmPM(PackageManager):
self._invoke_smart('flag --set ignore-recommends %s' % i)
self._invoke_smart('channel --add rpmsys type=rpm-sys -y')
- self._unlock_rpm_db()
-
'''
The rpm db lock files were produced after invoking rpm to query on
build system, and they caused the rpm on target didn't work, so we
need to unlock the rpm db by removing the lock files.
'''
- def _unlock_rpm_db(self):
+ def unlock_rpm_db(self):
# Remove rpm db lock files
rpm_db_locks = glob.glob('%s/var/lib/rpm/__db.*' % self.target_rootfs)
for f in rpm_db_locks: