Patchwork [v2] rootfs_ipk: delete opkg metadata if package management not required and all packages are configured

login
register
mail settings
Submitter Phil Blundell
Date May 31, 2011, 11:31 a.m.
Message ID <1306841498.2525.486.camel@phil-desktop>
Download mbox | patch
Permalink /patch/5101/
State New, archived
Headers show

Comments

Phil Blundell - May 31, 2011, 11:31 a.m.
Also remove update-rc.d and base-passwd since their services are no longer required.

Signed-off-by: Phil Blundell <philb@gnu.org>
---
 meta/classes/rootfs_ipk.bbclass |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
Saul Wold - May 31, 2011, 5:07 p.m.
On 05/31/2011 04:31 AM, Phil Blundell wrote:
> Also remove update-rc.d and base-passwd since their services are no longer required.
>
This patch message stripped all the information you had in the v1 
message.  I think that was useful information.

Please resend the patch with the full header.

Thanks
Sau!
> Signed-off-by: Phil Blundell<philb@gnu.org>
> ---
>   meta/classes/rootfs_ipk.bbclass |   11 +++++++++++
>   1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
> index edd84fb..3b4b4da 100644
> --- a/meta/classes/rootfs_ipk.bbclass
> +++ b/meta/classes/rootfs_ipk.bbclass
> @@ -82,6 +82,17 @@ fakeroot rootfs_ipk_do_rootfs () {
>   	
>   	rm -f ${IMAGE_ROOTFS}${opkglibdir}/lists/*
>
> +	if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then
> +		if [ $runtime_script_required -eq 0 ]; then
> +			# All packages were successfully configured.
> +			# update-rc.d, base-passwd are no further use, remove them now
> +			opkg-cl ${IPKG_ARGS} --force-depends remove update-rc.d base-passwd || true
> +
> +			# Also delete the status files
> +			rm -rf ${IMAGE_ROOTFS}${opkglibdir}
> +		fi
> +	fi
> +
>   	log_check rootfs 	
>   }
>

Patch

diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index edd84fb..3b4b4da 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -82,6 +82,17 @@  fakeroot rootfs_ipk_do_rootfs () {
 	
 	rm -f ${IMAGE_ROOTFS}${opkglibdir}/lists/*
 
+	if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then
+		if [ $runtime_script_required -eq 0 ]; then
+			# All packages were successfully configured.
+			# update-rc.d, base-passwd are no further use, remove them now
+			opkg-cl ${IPKG_ARGS} --force-depends remove update-rc.d base-passwd || true
+
+			# Also delete the status files
+			rm -rf ${IMAGE_ROOTFS}${opkglibdir}
+		fi
+	fi
+
 	log_check rootfs 	
 }