Skip to contentSkip to conversation

Cleanups: grub, autotools, meta-environment

PATCH Applied Darren Hart 5 participants 13 messages Nov 30, 2011

lore
Share & tools
lore
#0 lore raw

cover Cleanups: grub, autotools, meta-environment

During grub feature development I ran across various bugs, typos, thinkos, ommisions, etc. that I've collected in this series.

The following changes since commit 2864ff6a4b3c3f9b3bbb6d2597243cc5d3715939:

getVar/setVar cleanups (2011-11-26 22:42:00 +0000)

are available in the git repository at:
git://git.yoctoproject.org/user-contrib/dvhart/oe-core cleanup
http://git.yoctoproject.org/cgit.cgi/user-contrib/dvhart/oe-core/log/?h=cleanup

Darren Hart (4):
meta-environment: Fix a typo in do_populate_sysroot[noexec] autotools.bbclass: Report the missing configure path
grub: Use COMPATIBLE_MACHINE
grub: Drop "apply=yes" from patch

 meta/classes/autotools.bbclass             |    9 +++++----
 meta/recipes-bsp/grub/grub_1.99.bb         |   11 +++--------
 meta/recipes-core/meta/meta-environment.bb |    2 +-
 3 files changed, 9 insertions(+), 13 deletions(-)
Signature · 1 line
1.7.6.4
#1 lore raw

PATCH 1/4 meta-environment: Fix a typo in do_populate_sysroot[noexec]

From: Darren Hart <[email protected]>

I noticed with while grepping for usage of noexec. Replace do_populage_sysroot with do_populate_sysroot.

---
 meta/recipes-core/meta/meta-environment.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-core/meta/meta-environment.bb +1 -1
index 39ba96c..8f9391a 100644
@@ -48,4 +48,4 @@ do_unpack[noexec] = "1"
 do_patch[noexec] = "1"
 do_configure[noexec] = "1"
 do_compile[noexec] = "1"
-do_populage_sysroot[noexec] = "1"
+do_populate_sysroot[noexec] = "1"
Signature · 1 line
1.7.6.4
#2 lore raw

PATCH 2/4 autotools.bbclass: Report the missing configure path

From: Darren Hart <[email protected]>

If the configure script isn't found, report the explicit path tried. This can help debug subtle errors where the ${S} sourcedir may not be exactly what is expected.

---
 meta/classes/autotools.bbclass |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
meta/classes/autotools.bbclass +5 -4
index 37e7d4b..7536bac 100644
@@ -70,11 +70,12 @@ CONFIGUREOPT_DEPTRACK = "--disable-dependency-tracking"
 
 
 oe_runconf () {
-	if [ -x ${S}/configure ] ; then
-		bbnote "Running ${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
-		${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" || bbfatal "oe_runconf failed"
+	cfgscript="${S}/configure"
+	if [ -x "$cfgscript" ] ; then
+		bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
+		$cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" || bbfatal "oe_runconf failed"
 	else
-		bbfatal "no configure script found"
+		bbfatal "no configure script found at $cfgscript"
 	fi
 }
 
Signature · 1 line
1.7.6.4
#3 lore raw

Re: [PATCH 2/4] autotools.bbclass: Report the missing configure path

Quoted 26 lines · Darren Hart

From: Darren Hart <[email protected]>

If the configure script isn't found, report the explicit path tried. This can help debug subtle errors where the ${S} sourcedir may not be exactly what is expected.

---
 meta/classes/autotools.bbclass |    9 +++++----

 1 files changed, 5 insertions(+), 4 deletions(-)
meta/classes/autotools.bbclass +4 -3
index 37e7d4b..7536bac 100644
@@ -70,11 +70,12 @@ CONFIGUREOPT_DEPTRACK = "--disable-dependency-tracking"
 
 
  oe_runconf () {
-       if [ -x ${S}/configure ] ; then
-               bbnote "Running ${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
-               ${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" || bbfatal "oe_runconf failed"
+       cfgscript="${S}/configure"
+       if [ -x "$cfgscript" ] ; then
+               bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
+               $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" || bbfatal "oe_runconf failed"
Quoted 3 lines

       else
-               bbfatal "no configure script found"
+               bbfatal "no configure script found at $cfgscript"

why not just do one line change something like

bbfatal "configure script ${S}/configure not found"

Quoted 11 lines

       fi
 }

--
1.7.6.4

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

#4 lore raw

Re: [PATCH 2/4] autotools.bbclass: Report the missing configure path

Quoted 33 lines · Khem Raj
Quoted 19 lines · Darren Hart

From: Darren Hart <[email protected]>

If the configure script isn't found, report the explicit path tried. This can help debug subtle errors where the ${S} sourcedir may not be exactly what is expected.

---
 meta/classes/autotools.bbclass |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
meta/classes/autotools.bbclass +0 -0
index 37e7d4b..7536bac 100644
@@ -70,11 +70,12 @@ CONFIGUREOPT_DEPTRACK = "--disable-dependency-tracking"
 
 
 oe_runconf () {

meta/classes/autotools.bbclass CONFIGUREOPT_DEPTRACK = "--disable-dependency-tracking" · line 78

Quoted 10 lines
meta/classes/autotools.bbclass +5 -4
-       if [ -x ${S}/configure ] ; then
-               bbnote "Running ${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
-               ${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" || bbfatal "oe_runconf failed"
+       cfgscript="${S}/configure"
+       if [ -x "$cfgscript" ] ; then
+               bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
+               $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" || bbfatal "oe_runconf failed"
       else
-               bbfatal "no configure script found"
+               bbfatal "no configure script found at $cfgscript"

why not just do one line change something like

Quoted 1 line

bbfatal "configure script ${S}/configure not found"

I prefer to use a variable when I need a value more than once. It avoids future bugs where one is changed and the others were missed. As this string is used 4 times, it seemed like the right call.

--
Darren

Quoted 12 lines
Quoted 12 lines
meta/classes/autotools.bbclass +0 -1
       fi
 }
 
--

1.7.6.4

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

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#5 lore raw

Re: [PATCH 2/4] autotools.bbclass: Report the missing configure path

Quoted 10 lines
Quoted 6 lines
Quoted 2 lines

-               bbfatal "no configure script found"
+               bbfatal "no configure script found at $cfgscript"

why not just do one line change something like

bbfatal "configure script ${S}/configure not found"

I prefer to use a variable when I need a value more than once. It avoids future bugs where one is changed and the others were missed. As this string is used 4 times, it seemed like the right call.

ok with variable still the cfgscript itself is the script and the message "no configure script found at $cfgscript"
seems like $cfgscript is a location. you may want to make it "$cfgscript configure script not found" or something

#6 lore raw

Re: [PATCH 2/4] autotools.bbclass: Report the missing configure path

Quoted 7 lines · Khem Raj
Quoted 7 lines
Quoted 6 lines

meta/classes/autotools.bbclass CONFIGUREOPT_DEPTRACK = "--disable-dependency-tracking" · line 78

Quoted 2 lines
meta/classes/autotools.bbclass +1 -1
-               bbfatal "no configure script found"
+               bbfatal "no configure script found at $cfgscript"

why not just do one line change something like

bbfatal "configure script ${S}/configure not found"

Quoted 8 lines
Quoted 3 lines

I prefer to use a variable when I need a value more than once. It avoids future bugs where one is changed and the others were missed. As this string is used 4 times, it seemed like the right call.

ok with variable still the cfgscript itself is the script and the message "no configure script found at $cfgscript"
seems like $cfgscript is a location. you may want to make it "$cfgscript configure script not found" or something

I can see that (although I think can be argued this is correct as well - a path with a filename is still a location). I was copying the language used elsewhere... but from where is eluding my search at the moment. RP has pulled these already I believe, so if the language here truly bothers you, we can address it in a follow-on. Personally I don't think it's really worth the trouble.

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#7 lore raw

Re: [PATCH 2/4] autotools.bbclass: Report the missing configure path

Quoted 6 lines

I can see that (although I think can be argued this is correct as well - a path with a filename is still a location). I was copying the language used elsewhere... but from where is eluding my search at the moment. RP has pulled these already I believe, so if the language here truly bothers you, we can address it in a follow-on. Personally I don't think it's really worth the trouble.

yeah its fine

#8 lore raw

PATCH 3/4 grub: Use COMPATIBLE_MACHINE

In reply to Darren Hart

From: Darren Hart <[email protected]>

Drop the anonymous python block in favor of the much simpler COMPATIBLE_MACHINE mechanism.

---
 meta/recipes-bsp/grub/grub_1.99.bb |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
meta/recipes-bsp/grub/grub_1.99.bb +2 -7
index b6aa827..66ad669 100644
@@ -22,6 +22,8 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
 SRC_URI[md5sum] = "ca9f2a2d571b57fc5c53212d1d22e2b5"
 SRC_URI[sha256sum] = "b91f420f2c51f6155e088e34ff99bea09cc1fb89585cf7c0179644e57abd28ff"
 
+COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
+
 inherit autotools
 inherit gettext
 
@@ -31,13 +33,6 @@ do_configure() {
     oe_runconf
 }
 
-python __anonymous () {
-    import re
-    host = d.getVar('HOST_SYS', 1)
-    if not re.match('x86.64.*-linux', host) and not re.match('i.86.*-linux', host):
-        raise bb.parse.SkipPackage("incompatible with host %s" % host)
-}
-
 do_install_append () {
     install -m 0755 ${WORKDIR}/40_custom ${D}${sysconfdir}/grub.d/40_custom
 }
Signature · 1 line
1.7.6.4
#9 lore raw

Re: [PATCH 3/4] grub: Use COMPATIBLE_MACHINE

Op 30 nov. 2011, om 22:49 heeft Darren Hart het volgende geschreven:

Quoted 4 lines

From: Darren Hart <[email protected]>

Drop the anonymous python block in favor of the much simpler COMPATIBLE_MACHINE mechanism.

minor nit: when I read the subject my first thought was "please use COMPATIBLE_HOST instead", but the actual patch is doing the right thing. Could you please amend the commit summary to has HOST instead of MACHINE?

regards,

Koen

#10 lore raw

Re: [PATCH 3/4] grub: Use COMPATIBLE_MACHINE

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · Koen Kooi

Op 30 nov. 2011, om 22:49 heeft Darren Hart het volgende geschreven:

Quoted 2 lines

From: Darren Hart <[email protected]>

Quoted 7 lines
Quoted 2 lines

Drop the anonymous python block in favor of the much simpler COMPATIBLE_MACHINE mechanism.

minor nit: when I read the subject my first thought was "please use COMPATIBLE_HOST instead", but the actual patch is doing the right thing. Could you please amend the commit summary to has HOST instead of MACHINE?

Thanks for the catch Koen!

I've rebased and pushed this series to the same location:

http://git.yoctoproject.org/cgit.cgi/user-contrib/dvhart/oe-core/commit/?h=cleanup&id=46d4be3925dec1c9b6fd228b0fd603e8f2416ed5

- --
Darren "Dufus" Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJO1qhZAAoJEKbMaAwKp364fxwH/0/8mhWaZkm3xu8+PRZxpCle 8lSiLZ8unO4qfUtXdXG96tlAHWlhAQfl1y3Zo4EoKcXoiSnV6rQX67nFrRnUAdge +E0uLYYJlLQUa9Yrbt8NbuR7TktiP28AK9/An7ljk/hNbyDEQQDTDwac02IhJmaC rBc1L3P/c6LuiN8hqCdZu4OXfahMndMkK3lzXaU0TVddfNr5o+jYiPmDRL9Dn0/W b75ogSHpKAzHhFEsOf563DPpdfagiz2e0B4t6SMBIxRDcgHQHmNIo6lvjfDfzFYc e7B3rA3nmWnHctkrDjs4GTO5wecfO1Xj31bpsPX6C7jW4f0BKrmdpk+PV/TGeUA= =Ingz
-----END PGP SIGNATURE-----

#11 lore raw

PATCH 4/4 grub: Drop "apply=yes" from patch

In reply to Darren Hart

From: Darren Hart <[email protected]>

The "apply=yes" doesn't appear to be necessary, drop it in favor of a simpler SRC_URI specification.

---
 meta/recipes-bsp/grub/grub_1.99.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-bsp/grub/grub_1.99.bb +1 -1
index 66ad669..49c26f6 100644
@@ -16,7 +16,7 @@ RDEPENDS_${PN} = "diffutils freetype"
 PR = "r2"
 
 SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
-          file://grub-install.in.patch;apply=yes \
+          file://grub-install.in.patch \
           file://40_custom"
 
 SRC_URI[md5sum] = "ca9f2a2d571b57fc5c53212d1d22e2b5"
Signature · 1 line
1.7.6.4
#12 lore raw
In reply to Darren Hart
Quoted 11 lines · Darren Hart

During grub feature development I ran across various bugs, typos, thinkos, ommisions, etc. that I've collected in this series.

The following changes since commit 2864ff6a4b3c3f9b3bbb6d2597243cc5d3715939:

getVar/setVar cleanups (2011-11-26 22:42:00 +0000)

are available in the git repository at:
git://git.yoctoproject.org/user-contrib/dvhart/oe-core cleanup
http://git.yoctoproject.org/cgit.cgi/user-contrib/dvhart/oe-core/log/?h=cleanup

Quoted 5 lines

Darren Hart (4):
meta-environment: Fix a typo in do_populate_sysroot[noexec] autotools.bbclass: Report the missing configure path
grub: Use COMPATIBLE_MACHINE
grub: Drop "apply=yes" from patch

Merged to master thanks (using v2 of the COMPATIBLE_MACHINE/HOST one).

I'm moving a little more rapidly with patches as there are a *lot* appearing at the moment and I want to get some of the simpler ones merged sooner than later.

Cheers,

Richard