lib/oe/package_manager.py: fix invoking rpm save_rpmpostinist failed
authorHongxu Jia <hongxu.jia@windriver.com>
Mon, 27 Jan 2014 06:36:25 +0000 (14:36 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 11 Feb 2014 11:53:42 +0000 (11:53 +0000)
- Use self.target_rootfs instead of self.image_rootfs as saved dir;
- Remove redundant comment line;

(From OE-Core rev: 41d6edab676277afbcaa6cf41cd64a5663f09dc7)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/package_manager.py

index 15e56b5..ea7866f 100644 (file)
@@ -740,11 +740,12 @@ class RpmPM(PackageManager):
                 break
 
         bb.note('  * postponing %s' % new_pkg)
-        saved_dir = self.image_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/') + new_pkg
+        saved_dir = self.target_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/') + new_pkg
+
         cmd = self.rpm_cmd + ' -q --scripts --root ' + self.target_rootfs
         cmd += ' --dbpath=/var/lib/rpm ' + new_pkg
         cmd += ' | sed -n -e "/^postinstall scriptlet (using .*):$/,/^.* scriptlet (using .*):$/ {/.*/p}"'
-        cmd += ' | sed -e "s/postinstall scriptlet (using \(.*\)):$/#!\1/"'
+        cmd += ' | sed -e "/postinstall scriptlet (using \(.*\)):$/d"'
         cmd += ' -e "/^.* scriptlet (using .*):$/d" > %s' % saved_dir
 
         try: