summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib')
-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):
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: