diff options
author | Tom Zanussi <tom.zanussi@intel.com> | 2012-06-18 23:36:47 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-02 05:52:16 -0700 |
commit | ba463277ff342a8dc77d9a59c6e879e06a855298 (patch) | |
tree | 81eadca05f84e812199edc021b6b1b08d5022a2e /scripts | |
parent | 7c5c1ad72b2313fd234550481016ec83c76650e9 (diff) | |
download | openembedded-core-contrib-ba463277ff342a8dc77d9a59c6e879e06a855298.tar.gz |
yocto-bsp: add new strip_base() function
Add a strip_base() function to remove '/base' from the branch names
presented to the user.
(From meta-yocto rev: 216a38f6bb453e8e6617f82c3642151dbde2f377)
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/bsp/engine.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/lib/bsp/engine.py b/scripts/lib/bsp/engine.py index 00ce863f03..ac5058ca1f 100644 --- a/scripts/lib/bsp/engine.py +++ b/scripts/lib/bsp/engine.py @@ -449,6 +449,16 @@ def boolean(input_str, name): return name +def strip_base(input_str): + """ + strip '/base' off the end of input_str, so we can use 'base' in + the branch names we present to the user. + """ + if input_str and input_str.endswith("/base"): + return input_str[:-len("/base")] + return input_str.strip() + + deferred_choices = {} def gen_choices_defer(input_line, context, checklist = False): |