diff options
| -rwxr-xr-x | scripts/devtool | 5 | ||||
| -rw-r--r-- | scripts/lib/devtool/standard.py | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/scripts/devtool b/scripts/devtool index a651d8f213..b4bfbb8329 100755 --- a/scripts/devtool +++ b/scripts/devtool | |||
| @@ -117,12 +117,13 @@ def read_workspace(): | |||
| 117 | for line in f: | 117 | for line in f: |
| 118 | res = externalsrc_re.match(line.rstrip()) | 118 | res = externalsrc_re.match(line.rstrip()) |
| 119 | if res: | 119 | if res: |
| 120 | pn = res.group(2) or os.path.splitext(os.path.basename(fn))[0].split('_')[0] | 120 | recipepn = os.path.splitext(os.path.basename(fn))[0].split('_')[0] |
| 121 | pn = res.group(2) or recipepn | ||
| 121 | # Find the recipe file within the workspace, if any | 122 | # Find the recipe file within the workspace, if any |
| 122 | bbfile = os.path.basename(fn).replace('.bbappend', '.bb').replace('%', '*') | 123 | bbfile = os.path.basename(fn).replace('.bbappend', '.bb').replace('%', '*') |
| 123 | recipefile = glob.glob(os.path.join(config.workspace_path, | 124 | recipefile = glob.glob(os.path.join(config.workspace_path, |
| 124 | 'recipes', | 125 | 'recipes', |
| 125 | pn, | 126 | recipepn, |
| 126 | bbfile)) | 127 | bbfile)) |
| 127 | if recipefile: | 128 | if recipefile: |
| 128 | recipefile = recipefile[0] | 129 | recipefile = recipefile[0] |
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 26187a0c41..f29d8cbb68 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
| @@ -1744,6 +1744,7 @@ def status(args, config, basepath, workspace): | |||
| 1744 | 1744 | ||
| 1745 | def _reset(recipes, no_clean, config, basepath, workspace): | 1745 | def _reset(recipes, no_clean, config, basepath, workspace): |
| 1746 | """Reset one or more recipes""" | 1746 | """Reset one or more recipes""" |
| 1747 | import oe.path | ||
| 1747 | 1748 | ||
| 1748 | def clean_preferred_provider(pn, layerconf_path): | 1749 | def clean_preferred_provider(pn, layerconf_path): |
| 1749 | """Remove PREFERRED_PROVIDER from layer.conf'""" | 1750 | """Remove PREFERRED_PROVIDER from layer.conf'""" |
| @@ -1802,7 +1803,10 @@ def _reset(recipes, no_clean, config, basepath, workspace): | |||
| 1802 | preservedir(os.path.join(root, dn)) | 1803 | preservedir(os.path.join(root, dn)) |
| 1803 | os.rmdir(origdir) | 1804 | os.rmdir(origdir) |
| 1804 | 1805 | ||
| 1805 | preservedir(os.path.join(config.workspace_path, 'recipes', pn)) | 1806 | recipefile = workspace[pn]['recipefile'] |
| 1807 | if recipefile and oe.path.is_path_parent(config.workspace_path, recipefile): | ||
| 1808 | # This should always be true if recipefile is set, but just in case | ||
| 1809 | preservedir(os.path.dirname(recipefile)) | ||
| 1806 | # We don't automatically create this dir next to appends, but the user can | 1810 | # We don't automatically create this dir next to appends, but the user can |
| 1807 | preservedir(os.path.join(config.workspace_path, 'appends', pn)) | 1811 | preservedir(os.path.join(config.workspace_path, 'appends', pn)) |
| 1808 | 1812 | ||
