[3/4] grub: Use COMPATIBLE_MACHINE

Submitted by Darren Hart on Nov. 30, 2011, 9:49 p.m.

Details

Message ID d66f152cffd363fe56c6f58e9559288020524d83.1322689519.git.darren@dvhart.com
State Accepted
Commit 36654d6d393cb8c8a545835184a96be4ae0c885d
Headers show

Commit Message

Darren Hart Nov. 30, 2011, 9:49 p.m.
From: Darren Hart <dvhart@linux.intel.com>

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

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Tom Zanussi <tom.zanussi@intel.com>
---
 meta/recipes-bsp/grub/grub_1.99.bb |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-bsp/grub/grub_1.99.bb b/meta/recipes-bsp/grub/grub_1.99.bb
index b6aa827..66ad669 100644
--- a/meta/recipes-bsp/grub/grub_1.99.bb
+++ b/meta/recipes-bsp/grub/grub_1.99.bb
@@ -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
 }

Comments

Koen Kooi Nov. 30, 2011, 9:57 p.m.
Op 30 nov. 2011, om 22:49 heeft Darren Hart het volgende geschreven:

> From: Darren Hart <dvhart@linux.intel.com>
> 
> 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
Darren Hart Nov. 30, 2011, 10:04 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/30/2011 01:57 PM, Koen Kooi wrote:
> 
> Op 30 nov. 2011, om 22:49 heeft Darren Hart het volgende
> geschreven:
> 
>> From: Darren Hart <dvhart@linux.intel.com>
>> 
>> 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-----