* [PATCH] rootfs_ipk: delete opkg metadata if package management not required and all packages are configured
@ 2011-05-26 11:29 Phil Blundell
2011-05-31 11:31 ` [PATCH v2] " Phil Blundell
0 siblings, 1 reply; 5+ messages in thread
From: Phil Blundell @ 2011-05-26 11:29 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
If all the postinsts were successfully run in offline mode, and
package-management hasn't been requested as an IMAGE_FEATURE, the opkg
metadata is now redundant and can safely be deleted.
If some packages are still unconfigured at this point then we need to
keep their metadata around so that either opkg or the awk script can
configure the packages at boot time. In theory it would be possible to
strip out the data for packages that have already been configured, but
right now we just hold on to the whole status file in that situation.
Signed-off-by: Phil Blundell <philb@gnu.org>
---
meta/classes/rootfs_ipk.bbclass | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index edd84fb..53099e9 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -82,6 +82,13 @@ 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, status file no longer required
+ rm -rf ${IMAGE_ROOTFS}${opkglibdir}
+ fi
+ fi
+
log_check rootfs
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2] rootfs_ipk: delete opkg metadata if package management not required and all packages are configured
2011-05-26 11:29 [PATCH] rootfs_ipk: delete opkg metadata if package management not required and all packages are configured Phil Blundell
@ 2011-05-31 11:31 ` Phil Blundell
2011-05-31 17:07 ` Saul Wold
0 siblings, 1 reply; 5+ messages in thread
From: Phil Blundell @ 2011-05-31 11:31 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
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(-)
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
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2] rootfs_ipk: delete opkg metadata if package management not required and all packages are configured
2011-05-31 11:31 ` [PATCH v2] " Phil Blundell
@ 2011-05-31 17:07 ` Saul Wold
2011-06-01 10:41 ` [PATCH v3] " Phil Blundell
0 siblings, 1 reply; 5+ messages in thread
From: Saul Wold @ 2011-05-31 17:07 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Phil Blundell
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
> }
>
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v3] rootfs_ipk: delete opkg metadata if package management not required and all packages are configured
2011-05-31 17:07 ` Saul Wold
@ 2011-06-01 10:41 ` Phil Blundell
2011-06-03 0:12 ` Saul Wold
0 siblings, 1 reply; 5+ messages in thread
From: Phil Blundell @ 2011-06-01 10:41 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
If all the postinsts were successfully run in offline mode, and
package-management hasn't been requested as an IMAGE_FEATURE, the opkg
metadata is now redundant and can safely be deleted.
Also, the update-rc.d and base-passwd packages can be removed since
they will serve no further purpose in this situation.
If some packages are still unconfigured at this point then we need to
keep their metadata around so that either opkg or the awk script can
configure the packages at boot time. In theory it would be possible to
strip out the data for packages that have already been configured, but
right now we just hold on to the whole status file in that situation.
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
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v3] rootfs_ipk: delete opkg metadata if package management not required and all packages are configured
2011-06-01 10:41 ` [PATCH v3] " Phil Blundell
@ 2011-06-03 0:12 ` Saul Wold
0 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2011-06-03 0:12 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On 06/01/2011 03:41 AM, Phil Blundell wrote:
> If all the postinsts were successfully run in offline mode, and
> package-management hasn't been requested as an IMAGE_FEATURE, the opkg
> metadata is now redundant and can safely be deleted.
>
> Also, the update-rc.d and base-passwd packages can be removed since
> they will serve no further purpose in this situation.
>
> If some packages are still unconfigured at this point then we need to
> keep their metadata around so that either opkg or the awk script can
> configure the packages at boot time. In theory it would be possible to
> strip out the data for packages that have already been configured, but
> right now we just hold on to the whole status file in that situation.
>
> 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
> }
>
Merged into oe-core
Thanks
Sau!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-03 0:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26 11:29 [PATCH] rootfs_ipk: delete opkg metadata if package management not required and all packages are configured Phil Blundell
2011-05-31 11:31 ` [PATCH v2] " Phil Blundell
2011-05-31 17:07 ` Saul Wold
2011-06-01 10:41 ` [PATCH v3] " Phil Blundell
2011-06-03 0:12 ` Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox