summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@intel.com>2012-06-18 23:36:47 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-02 05:52:16 -0700
commitba463277ff342a8dc77d9a59c6e879e06a855298 (patch)
tree81eadca05f84e812199edc021b6b1b08d5022a2e /scripts
parent7c5c1ad72b2313fd234550481016ec83c76650e9 (diff)
downloadpoky-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.py10
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
452def 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
452deferred_choices = {} 462deferred_choices = {}
453 463
454def gen_choices_defer(input_line, context, checklist = False): 464def gen_choices_defer(input_line, context, checklist = False):