All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] linux.inc: don't choke on missing defconfig in lzop dep
@ 2011-12-20 18:16 Christopher Larson
  2011-12-30 18:12 ` Koen Kooi
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Larson @ 2011-12-20 18:16 UTC (permalink / raw)
  To: meta-ti

When a recipe is being parsed which will be skipped due to an incompatible
machine, no local defconfig will exist for the current machine. It seems 
that
the fetch localpath code doesn't error in that case, so we need to check for
an IOError on the attempted open. Without this, we can hit parse errors.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
  recipes-kernel/linux/linux.inc |   15 ++++++++++-----
  1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/recipes-kernel/linux/linux.inc b/recipes-kernel/linux/linux.inc
index e8a754f..6996283 100644
--- a/recipes-kernel/linux/linux.inc
+++ b/recipes-kernel/linux/linux.inc
@@ -269,9 +269,14 @@ python () {
      try:
          defconfig = bb.fetch2.localpath('file://defconfig', d)
      except bb.fetch2.FetchError:
-        pass
-    else:
-        if 'CONFIG_KERNEL_LZO=y\n' in open(defconfig).readlines():
-            depends = d.getVar('DEPENDS', False)
-            d.setVar('DEPENDS', depends + ' lzop-native')
+        return
+
+    try:
+        configfile = open(defconfig)
+    except IOError:
+        return
+
+    if 'CONFIG_KERNEL_LZO=y\n' in configfile.readlines():
+        depends = d.getVar('DEPENDS', False)
+        d.setVar('DEPENDS', depends + ' lzop-native')
  }
-- 
1.7.8



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-30 18:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20 18:16 [PATCH] linux.inc: don't choke on missing defconfig in lzop dep Christopher Larson
2011-12-30 18:12 ` Koen Kooi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.