Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/4] sanity.bbclass: re-enable DISTRO check
Date: Wed,  7 Sep 2011 17:05:40 +0100	[thread overview]
Message-ID: <529b4c300df54eac60f56c2eb9063ea7fc034945.1315411460.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1315411459.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1315411459.git.paul.eggleton@linux.intel.com>

If DISTRO has been specified, ensure it is valid. (Unset or empty string
is valid for DISTRO in OE-core by the use of defaultsetup.conf.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/sanity.bbclass |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 44b0688..93008cc 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -269,10 +269,12 @@ def check_sanity(e):
     if os.path.exists(dldir) and not os.access(dldir, os.W_OK):
         messages = messages + "DL_DIR: %s exists but you do not appear to have write access to it. \n" % dldir
     
-    # Check that the DISTRO is valid
+    # Check that the DISTRO is valid, if set
     # need to take into account DISTRO renaming DISTRO
-    #if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ):
-    #    messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", e.data, True )
+    distro = data.getVar('DISTRO', e.data, True)
+    if distro:
+        if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ):
+            messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", e.data, True )
 
     missing = ""
 
-- 
1.7.4.1




  parent reply	other threads:[~2011-09-07 16:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-07 16:05 [PATCH 0/4] Some miscellaneous bugfixes Paul Eggleton
2011-09-07 16:05 ` [PATCH 1/4] core-image.bbclass: zap root password if debug-tweaks not enabled Paul Eggleton
2011-09-07 16:05 ` Paul Eggleton [this message]
2011-09-07 16:05 ` [PATCH 3/4] meta/recipes.txt: correct Qt capitalisation Paul Eggleton
2011-09-07 16:05 ` [PATCH 4/4] base.bbclass: fix substring matching in COMMERCIAL_LICENSE Paul Eggleton
2011-09-07 21:56 ` [PATCH 0/4] Some miscellaneous bugfixes Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=529b4c300df54eac60f56c2eb9063ea7fc034945.1315411460.git.paul.eggleton@linux.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox