From: Joshua Lock <josh@linux.intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: [PATCH 3/6] hob: add a test to ensure hob is run with the required pre and post files
Date: Fri, 2 Sep 2011 17:17:38 -0700 [thread overview]
Message-ID: <9d48cd66c494b045c2207c9989fa1002737c1af6.1315008498.git.josh@linux.intel.com> (raw)
In-Reply-To: <cover.1315008498.git.josh@linux.intel.com>
In-Reply-To: <cover.1315008498.git.josh@linux.intel.com>
hob requires pre and post configuration files to store configuration values
in, whilst this should (and will) be fixed long-term for so long as we
require these files we should alert the user should they run without them.
Fixes [YOCTO #1383]
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/hob.py | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index 022d1b6..3b0cacc 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -982,6 +982,27 @@ class MainWindow (gtk.Window):
def main (server, eventHandler):
gobject.threads_init()
+ # NOTE: For now we require that the user run with pre and post files to
+ # read and store configuration set in the GUI.
+ # We hope to adjust this long term as tracked in Yocto Bugzilla #1441
+ # http://bugzilla.pokylinux.org/show_bug.cgi?id=1441
+ reqfiles = 0
+ dep_files = server.runCommand(["getVariable", "__depends"]) or set()
+ dep_files.union(server.runCommand(["getVariable", "__base_depends"]) or set())
+ for f in dep_files:
+ if f[0].endswith("hob-pre.conf"):
+ reqfiles = reqfiles + 1
+ elif f[0].endswith("hob-post.conf"):
+ reqfiles = reqfiles + 1
+ if reqfiles == 2:
+ break
+ if reqfiles < 2:
+ print("""The hob UI requires a pre file named hob-pre.conf and a post
+file named hob-post.conf to store and read its configuration from. Please run
+hob with these files, i.e.\n
+\bitbake -u hob -r conf/hob-pre.conf -R conf/hob-post.conf""")
+ return
+
taskmodel = TaskListModel()
configurator = Configurator()
handler = HobHandler(taskmodel, server)
--
1.7.6
next prev parent reply other threads:[~2011-09-03 0:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-03 0:17 [PATCH 0/6] hob changes for Yocto 1.1 Joshua Lock
2011-09-03 0:17 ` [PATCH 1/6] hob: use both pre and post files for hob configuration Joshua Lock
2011-09-03 0:17 ` [PATCH 2/6] hob: reflect defaultsetup being default distro Joshua Lock
2011-09-03 0:17 ` Joshua Lock [this message]
2011-09-03 0:17 ` [PATCH 4/6] ui/crumbs/hobprefs: disable 'build toolchain with headers' Joshua Lock
2011-09-03 0:17 ` [PATCH 5/6] ui/crumbs/runningbuild: mask run_buildstats failure Joshua Lock
2011-09-03 0:17 ` [PATCH 6/6] hob: disable removal of packages Joshua Lock
2011-09-05 19:16 ` [PATCH 0/6] hob changes for Yocto 1.1 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=9d48cd66c494b045c2207c9989fa1002737c1af6.1315008498.git.josh@linux.intel.com \
--to=josh@linux.intel.com \
--cc=bitbake-devel@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 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.