* [PATCH 0/1] yocto-bsp: add basic connectivity check
@ 2013-01-15 22:59 tom.zanussi
2013-01-15 22:59 ` [PATCH 1/1] yocto-bsp: add basic git " tom.zanussi
0 siblings, 1 reply; 2+ messages in thread
From: tom.zanussi @ 2013-01-15 22:59 UTC (permalink / raw)
To: poky
From: Tom Zanussi <tom.zanussi@intel.com>
This patchset adds a basic connectivity check meant to detect
basic connectivity and git configuration issues for yocto-bsp.
The check can be skipped by adding the new -s option to the
yocto-bsp create command-line.
The following changes since commit 5ba0919b5bcadba47f59a3b342aaa27048f0ff18:
scripts/lib/bsp/engine.py: add handling for JSON strings (2013-01-11 14:18:17 -0600)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib.git tzanussi/yocto-bsp-git-check
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/yocto-bsp-git-check
Tom Zanussi (1):
yocto-bsp: add basic git connectivity check
scripts/lib/bsp/tags.py | 2 +-
scripts/yocto-bsp | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
--
1.7.11.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] yocto-bsp: add basic git connectivity check
2013-01-15 22:59 [PATCH 0/1] yocto-bsp: add basic connectivity check tom.zanussi
@ 2013-01-15 22:59 ` tom.zanussi
0 siblings, 0 replies; 2+ messages in thread
From: tom.zanussi @ 2013-01-15 22:59 UTC (permalink / raw)
To: poky
From: Tom Zanussi <tom.zanussi@intel.com>
yocto-bsp create does a 'git ls-remote
git://git.yoctoproject.org/linux-yocto-3.4.git *heads*' to get the set
of existing branches from the kernel repo.
If the user isn't connected to the network, or if git isn't configured
sanely, yocto-bsp fails with an ugly Python backtrace.
We should try to avoid this by doing a basic sanity check for those
things before actually running the command.
The sanity check can be avoided by specifying -s on the yocto-bsp
command-line:
$ yocto-bsp create -s test qemu
Fixes [YOCTO #3279]
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
scripts/lib/bsp/tags.py | 2 +-
scripts/yocto-bsp | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/scripts/lib/bsp/tags.py b/scripts/lib/bsp/tags.py
index 256b25c..6d5feb0 100644
--- a/scripts/lib/bsp/tags.py
+++ b/scripts/lib/bsp/tags.py
@@ -41,7 +41,7 @@ INPUT_TYPE_PROPERTY = "type"
SRC_URI_FILE = "file://"
-
+GIT_CHECK_URI = "git://git.yoctoproject.org/linux-yocto-dev.git"
diff --git a/scripts/yocto-bsp b/scripts/yocto-bsp
index 126fc8d..d269861 100755
--- a/scripts/yocto-bsp
+++ b/scripts/yocto-bsp
@@ -58,6 +58,8 @@ def yocto_bsp_create_subcommand(args, usage_str):
help = "name of file containing the values for BSP properties as a JSON file")
parser.add_option("-c", "--codedump", dest = "codedump", action = "store_true",
default = False, help = "dump the generated code to bspgen.out")
+ parser.add_option("-s", "--skip-git-check", dest = "git_check", action = "store_false",
+ default = True, help = "skip the git connectivity check")
(options, args) = parser.parse_args(args)
if len(args) != 2:
@@ -73,6 +75,17 @@ def yocto_bsp_create_subcommand(args, usage_str):
else:
bsp_output_dir = "meta-" + machine
+ if options.git_check and not options.properties_file:
+ print "Checking basic git connectivity..."
+ if not verify_git_repo(GIT_CHECK_URI):
+ print "Couldn't verify git connectivity, exiting\n"
+ print "Details: couldn't access %s" % GIT_CHECK_URI
+ print " (this most likely indicates a network connectivity problem or"
+ print " a misconfigured git intallation)"
+ sys.exit(1)
+ else:
+ print "Done.\n"
+
yocto_bsp_create(machine, karch, scripts_path, bsp_output_dir, options.codedump, options.properties_file)
--
1.7.11.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-15 23:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-15 22:59 [PATCH 0/1] yocto-bsp: add basic connectivity check tom.zanussi
2013-01-15 22:59 ` [PATCH 1/1] yocto-bsp: add basic git " tom.zanussi
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.