diff options
| author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2019-11-19 23:52:52 +1300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-21 23:08:20 +0000 |
| commit | ea01bd31c3f4645ca0efddf6913d5136b4ea5a8a (patch) | |
| tree | 26b2362be77a540cee77f372ac0a5b0de0c4b633 /scripts/lib/scriptutils.py | |
| parent | 81cd5f77149c1879f0503aa719319e414747f54a (diff) | |
| download | poky-ea01bd31c3f4645ca0efddf6913d5136b4ea5a8a.tar.gz | |
devtool: fix devtool upgrade with reproducible_builds class
If the reproducible_build class is inherited then there may be a
"source-date-epoch" subdirectory in a fetched source tree; devtool
upgrade was not expecting that in the upgraded source. Take a small
snippet of code from recipetool create which already handles this,
and make it a shared function that can be used in both places.
Additionally, fix an assumption that the source is always in a
subdirectory in the cleanup code that blocked debugging this.
[YOCTO #13635]
(From OE-Core rev: 0d642861cd9cf034b8d4951433980addc215d4fd)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/scriptutils.py')
| -rw-r--r-- | scripts/lib/scriptutils.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py index c573dc7f67..45bdaf5f4e 100644 --- a/scripts/lib/scriptutils.py +++ b/scripts/lib/scriptutils.py | |||
| @@ -268,3 +268,13 @@ def is_src_url(param): | |||
| 268 | elif param.startswith('git@') or ('@' in param and param.endswith('.git')): | 268 | elif param.startswith('git@') or ('@' in param and param.endswith('.git')): |
| 269 | return True | 269 | return True |
| 270 | return False | 270 | return False |
| 271 | |||
| 272 | def filter_src_subdirs(pth): | ||
| 273 | """ | ||
| 274 | Filter out subdirectories of initial unpacked source trees that we do not care about. | ||
| 275 | Used by devtool and recipetool. | ||
| 276 | """ | ||
| 277 | dirlist = os.listdir(pth) | ||
| 278 | filterout = ['git.indirectionsymlink', 'source-date-epoch'] | ||
| 279 | dirlist = [x for x in dirlist if x not in filterout] | ||
| 280 | return dirlist | ||
