Skip to contentSkip to conversation

rootfs_*.bbclass: List which post-install scripts can not be run

PATCH New Mark Hatle 1 participant 1 message Nov 21, 2013

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

PATCH 1/1 rootfs_*.bbclass: List which post-install scripts can not be run

From: Jeffrey C Honig <[email protected]>

When preping a read-only rootfs and finding some post-install scripts that can not be run, list the names of said scripts to avoid having to look around the rootfs to find a list.

---
 meta/classes/rootfs_deb.bbclass | 5 +++--
 meta/classes/rootfs_ipk.bbclass | 5 +++--
 meta/classes/rootfs_rpm.bbclass | 5 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)
meta/classes/rootfs_deb.bbclass +3 -2
index b1c52f9..8613032 100644
@@ -91,8 +91,9 @@ fakeroot rootfs_deb_do_rootfs () {
 	${ROOTFS_POSTPROCESS_COMMAND}
 
 	if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
-		if [ -n "$(delayed_postinsts)" ]; then
-			bberror "Some packages could not be configured offline and rootfs is read-only."
+	        delayed_postinsts="$(delayed_postinsts)"
+		if [ -n "$delayed_postinsts" ]; then
+			bberror "The following packages could not be configured offline and rootfs is read-only: $delayed_postinsts"
 			exit 1
 		fi
 	fi
meta/classes/rootfs_ipk.bbclass +3 -2
index b0805dc..6ce3e5d 100644
@@ -89,8 +89,9 @@ fakeroot rootfs_ipk_do_rootfs () {
 	${ROOTFS_POSTPROCESS_COMMAND}
 
 	if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
-		if [ -n "$(delayed_postinsts)" ]; then
-			bberror "Some packages could not be configured offline and rootfs is read-only."
+	        delayed_postinsts="$(delayed_postinsts)"
+		if [ -n "$delayed_postinsts" ]; then
+			bberror "The following packages could not be configured offline and rootfs is read-only: $delayed_postinsts"
 			exit 1
 		fi
 	fi
meta/classes/rootfs_rpm.bbclass +3 -2
index 6c68ac8..1a0c225 100644
@@ -115,8 +115,9 @@ fakeroot rootfs_rpm_do_rootfs () {
 
 	if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
 		if [ -d ${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts ] ; then
-			if [ "`ls -A ${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts`" != "" ] ; then
-				bberror "Some packages could not be configured offline and rootfs is read-only."
+		        failed_pkgs=$(ls -A ${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts)
+			if [ -n "$failed_pkgs" ] ; then
+				bberror "The following post-install scripts could not be run offline and rootfs is read-only: $failed_pkgs"
 				exit 1
 			fi
 		fi
Signature · 1 line
1.8.1.2.545.g2f19ada