diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2014-03-28 12:10:43 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-30 10:10:32 +0100 |
commit | a5994c0837061440f79eff4a0a96e8769c2b22ee (patch) | |
tree | 8794f7739f4fe4f3a016777b9a369a23af723b54 /meta/lib/oe | |
parent | 6196e18bfee5b36417d795ea826a1086d27cbce3 (diff) | |
download | poky-a5994c0837061440f79eff4a0a96e8769c2b22ee.tar.gz |
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]
(From OE-Core rev: 12e300f0af2a27c15d80298d3fbb27b092c35154)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/package_manager.py | 8 |
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): | |||
299 | # bb.note(cmd) | 299 | # bb.note(cmd) |
300 | tmp_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip() | 300 | tmp_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip() |
301 | 301 | ||
302 | rpm_db_locks = glob.glob('%s/var/lib/rpm/__db.*' % self.rootfs_dir) | ||
303 | for f in rpm_db_locks: | ||
304 | bb.utils.remove(f, True) | ||
305 | except subprocess.CalledProcessError as e: | 302 | except subprocess.CalledProcessError as e: |
306 | bb.fatal("Cannot get the installed packages list. Command '%s' " | 303 | bb.fatal("Cannot get the installed packages list. Command '%s' " |
307 | "returned %d:\n%s" % (cmd, e.returncode, e.output)) | 304 | "returned %d:\n%s" % (cmd, e.returncode, e.output)) |
@@ -1101,7 +1098,6 @@ class RpmPM(PackageManager): | |||
1101 | output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip() | 1098 | output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip() |
1102 | bb.note(output) | 1099 | bb.note(output) |
1103 | os.chmod(saved_dir, 0755) | 1100 | os.chmod(saved_dir, 0755) |
1104 | self._unlock_rpm_db() | ||
1105 | except subprocess.CalledProcessError as e: | 1101 | except subprocess.CalledProcessError as e: |
1106 | bb.fatal("Invoke save_rpmpostinst failed. Command '%s' " | 1102 | bb.fatal("Invoke save_rpmpostinst failed. Command '%s' " |
1107 | "returned %d:\n%s" % (cmd, e.returncode, e.output)) | 1103 | "returned %d:\n%s" % (cmd, e.returncode, e.output)) |
@@ -1117,14 +1113,12 @@ class RpmPM(PackageManager): | |||
1117 | self._invoke_smart('flag --set ignore-recommends %s' % i) | 1113 | self._invoke_smart('flag --set ignore-recommends %s' % i) |
1118 | self._invoke_smart('channel --add rpmsys type=rpm-sys -y') | 1114 | self._invoke_smart('channel --add rpmsys type=rpm-sys -y') |
1119 | 1115 | ||
1120 | self._unlock_rpm_db() | ||
1121 | |||
1122 | ''' | 1116 | ''' |
1123 | The rpm db lock files were produced after invoking rpm to query on | 1117 | The rpm db lock files were produced after invoking rpm to query on |
1124 | build system, and they caused the rpm on target didn't work, so we | 1118 | build system, and they caused the rpm on target didn't work, so we |
1125 | need to unlock the rpm db by removing the lock files. | 1119 | need to unlock the rpm db by removing the lock files. |
1126 | ''' | 1120 | ''' |
1127 | def _unlock_rpm_db(self): | 1121 | def unlock_rpm_db(self): |
1128 | # Remove rpm db lock files | 1122 | # Remove rpm db lock files |
1129 | rpm_db_locks = glob.glob('%s/var/lib/rpm/__db.*' % self.target_rootfs) | 1123 | rpm_db_locks = glob.glob('%s/var/lib/rpm/__db.*' % self.target_rootfs) |
1130 | for f in rpm_db_locks: | 1124 | for f in rpm_db_locks: |