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/lib/bsp | |
parent | 7c5c1ad72b2313fd234550481016ec83c76650e9 (diff) | |
download | poky-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/lib/bsp')
-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): | |||
449 | return name | 449 | return name |
450 | 450 | ||
451 | 451 | ||
452 | def strip_base(input_str): | ||
453 | """ | ||
454 | strip '/base' off the end of input_str, so we can use 'base' in | ||
455 | the branch names we present to the user. | ||
456 | """ | ||
457 | if input_str and input_str.endswith("/base"): | ||
458 | return input_str[:-len("/base")] | ||
459 | return input_str.strip() | ||
460 | |||
461 | |||
452 | deferred_choices = {} | 462 | deferred_choices = {} |
453 | 463 | ||
454 | def gen_choices_defer(input_line, context, checklist = False): | 464 | def gen_choices_defer(input_line, context, checklist = False): |