Commit Graph

9 Commits

Author SHA1 Message Date
Humberto Ibarra 479d15b326 yocto-bsp: Refactor script to use argparse instead of optparse
Optparse is deprecated and should be avoided. The arparse library is better suited and has more tools to handling the parsing of arguments. This patch makes necessary changes to migrate to the better library and uses arparse subcommand feature to improve organization of this script.

[YOCTO #8321]

(From meta-yocto rev: 3f45993b96d4d960da0efe8672dc323c9db091a2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-07 13:38:13 +01:00
Humberto Ibarra 4ab8650eeb scripts/yocto-bsp: Removing version from yocto-bsp
The version option is not maintained and is useless inside this script.
There is no reason for this script to have an independent version value.

[YOCTO #8321]

(From meta-yocto rev: 8f8790e56d00f2eaaf6508fb1909335f1fbef5ff)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-07 13:38:13 +01:00
Humberto Ibarra 0aa5c27599 scripts/yocto-bsp: Fixed typo in parameter that was causing exception
There is a typo in the logging parameters, "filname" is being used instead
of "filename". This didn't cause issues before since python 2 didn't
validate unused parameters but with python >= 3.4.3 an exception is
thrown. This patch fixes this parameter name.

[Yocto #9736]

(From meta-yocto rev: aae5c2c39f64be87152b2e5470b50681c0f54670)

Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-12 23:47:19 +01:00
Ed Bartosh 7e739905a6 scripts: python3: change python to python3 in shebang
(From meta-yocto rev: c2629eb1a899a95571ec3649bec7998f130fac00)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-03 13:13:31 +01:00
Ed Bartosh ab75075e79 scripts: python3: Use print function
Used print function instead of print statement to make
the code work in python 3.

(From meta-yocto rev: d6eea5a794dd8802b773a9186479a863847e6e55)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01 12:47:10 +01:00
Richard Purdie 51217057d1 scripts, lib: Don't limit traceback lengths to arbitrary values
There appears to have been a lot of copy and pasting of the code
which prints tracebacks upon failure and limits the stack trace to
5 entries. This obscures the real error and is very confusing to the user
it look me an age to work out why some tracebacks weren't useful.

This patch removes the limit, making tracebacks much more useful for
debugging.

[YOCTO #9230]

(From meta-yocto rev: 2f00b2605353b9757a40636870ad20ee70bcab9d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 23:01:38 +01:00
Leonardo Sandoval b355a5e00e scripts/yocto-bsp: Exit successfully when asking for help
When user asks for help, the command should not exit with non-zero
status (failure), so removing the non-zero value on the system exit call.

(From meta-yocto rev: 98970326fb2f08e684cfc856103b2f9110c9f4fb)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01 07:43:38 +01:00
Tom Zanussi a746719a46 yocto-bsp: add basic git connectivity check
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]

(From meta-yocto rev: 496e76f9bed2ed5a04ef757724d2e63d05c7a601)

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-16 12:08:01 +00:00
Tom Zanussi 4fdaf05088 yocto-bsp: new script
Implementation of the 'yocto-bsp' command-line tool, for creating BSPs
and listing BSP properties.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
2012-03-22 19:21:15 +00:00