Patchwork [3/3] rootfs_ipk.bbclass: fix detection of script runtime requirement

login
register
mail settings
Submitter Otavio Salvador
Date Feb. 1, 2012, 8:27 p.m.
Message ID <cc36eb9f3e699b9c4478e4de0939e50eb317446f.1328127940.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/20511/
State New
Headers show

Comments

Otavio Salvador - Feb. 1, 2012, 8:27 p.m.
The code has been broken by 2feba313c991170747381c7cf821a45c2cd04632
that changed the way this detection has being done.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/classes/rootfs_ipk.bbclass |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
Phil Blundell - Feb. 1, 2012, 8:59 p.m.
On Wed, 2012-02-01 at 20:27 +0000, Otavio Salvador wrote:
> The code has been broken by 2feba313c991170747381c7cf821a45c2cd04632
> that changed the way this detection has being done.

What was the failure?  It isn't immediately obvious to me that this
patch will make any functional difference (except for adding the -q
argument to grep which was indeed missing).

p.
Otavio Salvador - Feb. 1, 2012, 9:03 p.m.
On Wed, Feb 1, 2012 at 18:59, Phil Blundell <philb@gnu.org> wrote:

> On Wed, 2012-02-01 at 20:27 +0000, Otavio Salvador wrote:
> > The code has been broken by 2feba313c991170747381c7cf821a45c2cd04632
> > that changed the way this detection has being done.
>
> What was the failure?  It isn't immediately obvious to me that this
> patch will make any functional difference (except for adding the -q
> argument to grep which was indeed missing).
>

Nothing where setting runtime_script_required as 0 in case it worked. So it
would never in fact remove the info files, even if read-only-fs where being
in use and functional.
Martin Jansa - Feb. 2, 2012, 8:48 a.m.
On Wed, Feb 01, 2012 at 08:27:45PM +0000, Otavio Salvador wrote:
> The code has been broken by 2feba313c991170747381c7cf821a45c2cd04632
> that changed the way this detection has being done.

Wasn't this fixed by 
http://git.openembedded.org/openembedded-core/commit/?id=6d3eac57bdba8e2582c210a2f82a3a4546f68581
?

> 
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  meta/classes/rootfs_ipk.bbclass |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
> index 48fb2fb..0881089 100644
> --- a/meta/classes/rootfs_ipk.bbclass
> +++ b/meta/classes/rootfs_ipk.bbclass
> @@ -74,9 +74,15 @@ fakeroot rootfs_ipk_do_rootfs () {
>  
>  	${OPKG_POSTPROCESS_COMMANDS}
>  	${ROOTFS_POSTINSTALL_COMMAND}
> -	
> +
> +	if grep -q Status:.install.ok.unpacked ${IMAGE_ROOTFS}${opkglibdir}status; then
> +		runtime_script_required=1
> +	else
> +		runtime_script_required=0
> +	fi
> +
>  	if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
> -		if grep Status:.install.ok.unpacked ${IMAGE_ROOTFS}${opkglibdir}status; then
> +		if [ $runtime_script_required -eq 1 ]; then
>  			echo "Some packages could not be configured offline and rootfs is read-only."
>  			exit 1
>  		fi
> -- 
> 1.7.2.5
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Phil Blundell - Feb. 2, 2012, 10:42 a.m.
On Wed, 2012-02-01 at 19:03 -0200, Otavio Salvador wrote:
> On Wed, Feb 1, 2012 at 18:59, Phil Blundell <philb@gnu.org> wrote:
>         On Wed, 2012-02-01 at 20:27 +0000, Otavio Salvador wrote:
>         > The code has been broken by
>         2feba313c991170747381c7cf821a45c2cd04632
>         > that changed the way this detection has being done.
>         
>         
>         What was the failure?  It isn't immediately obvious to me that
>         this
>         patch will make any functional difference (except for adding
>         the -q
>         argument to grep which was indeed missing).
> 
> 
> Nothing where setting runtime_script_required as 0 in case it worked.
> So it would never in fact remove the info files, even if read-only-fs
> where being in use and functional.

What else was using runtime_script_required?  I thought the last
references to that were removed by the patch in:

http://lists.linuxtogo.org/pipermail/openembedded-core/2012-January/016773.html

Did that one not get merged?

p.

Patch

diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 48fb2fb..0881089 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -74,9 +74,15 @@  fakeroot rootfs_ipk_do_rootfs () {
 
 	${OPKG_POSTPROCESS_COMMANDS}
 	${ROOTFS_POSTINSTALL_COMMAND}
-	
+
+	if grep -q Status:.install.ok.unpacked ${IMAGE_ROOTFS}${opkglibdir}status; then
+		runtime_script_required=1
+	else
+		runtime_script_required=0
+	fi
+
 	if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
-		if grep Status:.install.ok.unpacked ${IMAGE_ROOTFS}${opkglibdir}status; then
+		if [ $runtime_script_required -eq 1 ]; then
 			echo "Some packages could not be configured offline and rootfs is read-only."
 			exit 1
 		fi