Skip to contentSkip to conversation

image.bbclass: leave metadata in place if a PM is installed in the image

PATCH In review Laurentiu Palcu 1 participant 3 messages Sep 5, 2013

lore
Share & tools
lore
#0 lore raw

v2 cover image.bbclass: leave metadata in place if a PM is installed in the image

Changes in v2:
* removed 'package-management' condition;

Thanks,
Laurentiu

The following changes since commit f41b7a7d4d0463a0dfafe6621d01680b81798019:

bitbake: hob: remove PACKAGE_INSTALL variable setting from hob (2013-09-04 14:18:49 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib lpalcu/b4484_postinstalls_dont_run_for_ipk
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=lpalcu/b4484_postinstalls_dont_run_for_ipk

Laurentiu Palcu (1):
image.bbclass: leave metadata in place if a PM is installed in the
image

 meta/classes/image.bbclass |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/1 image.bbclass: leave metadata in place if a PM is installed in the image

If IMAGE_FEATURES does not contain 'package-management' but the user manually installs a package manager (opkg/dpkg/rpm) using CORE_IMAGE_EXTRA_INSTALL (for example), then do not remove update-rc.d, base-passwd and package metadata because these will be needed by the package manager to function correcly.

[YOCTO #4484]

---
 meta/classes/image.bbclass |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/classes/image.bbclass +5 -1
index 84f638c..b748397 100644
@@ -498,7 +498,11 @@ rootfs_install_complementary() {
 }
 
 rootfs_uninstall_unneeded () {
-	if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then
+	rpm_installed=${@base_contains("PACKAGE_INSTALL", "rpm",  "true", "false", d)}
+	opkg_installed=${@base_contains("PACKAGE_INSTALL", "opkg", "true", "false", d)}
+	dpkg_installed=${@base_contains("PACKAGE_INSTALL", "dpkg", "true", "false", d)}
+
+	if ! $rpm_installed && ! $opkg_installed && ! $dpkg_installed; then
 		if [ -z "$(delayed_postinsts)" ]; then
 			# All packages were successfully configured.
 			# update-rc.d, base-passwd, run-postinsts are no further use, remove them now
Signature · 1 line
1.7.9.5
#2 lore raw

Ignore this patch for the moment. I'm investigating another alternative.

Laurentiu

Quoted 37 lines · Laurentiu Palcu

If IMAGE_FEATURES does not contain 'package-management' but the user manually installs a package manager (opkg/dpkg/rpm) using CORE_IMAGE_EXTRA_INSTALL (for example), then do not remove update-rc.d, base-passwd and package metadata because these will be needed by the package manager to function correcly.

[YOCTO #4484]

---
 meta/classes/image.bbclass |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/classes/image.bbclass +5 -1
index 84f638c..b748397 100644
@@ -498,7 +498,11 @@ rootfs_install_complementary() {
 }
 
 rootfs_uninstall_unneeded () {
-	if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then
+	rpm_installed=${@base_contains("PACKAGE_INSTALL", "rpm",  "true", "false", d)}
+	opkg_installed=${@base_contains("PACKAGE_INSTALL", "opkg", "true", "false", d)}
+	dpkg_installed=${@base_contains("PACKAGE_INSTALL", "dpkg", "true", "false", d)}
+
+	if ! $rpm_installed && ! $opkg_installed && ! $dpkg_installed; then
 		if [ -z "$(delayed_postinsts)" ]; then
 			# All packages were successfully configured.
 			# update-rc.d, base-passwd, run-postinsts are no further use, remove them now
Signature · 6 lines
1.7.9.5

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core