diff options
Diffstat (limited to 'scripts/devtool')
-rwxr-xr-x | scripts/devtool | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/devtool b/scripts/devtool index af4811b922..20d785c7f7 100755 --- a/scripts/devtool +++ b/scripts/devtool | |||
@@ -104,6 +104,7 @@ def read_workspace(): | |||
104 | for fn in glob.glob(os.path.join(config.workspace_path, 'appends', '*.bbappend')): | 104 | for fn in glob.glob(os.path.join(config.workspace_path, 'appends', '*.bbappend')): |
105 | with open(fn, 'r') as f: | 105 | with open(fn, 'r') as f: |
106 | pnvalues = {} | 106 | pnvalues = {} |
107 | pn = None | ||
107 | for line in f: | 108 | for line in f: |
108 | res = externalsrc_re.match(line.rstrip()) | 109 | res = externalsrc_re.match(line.rstrip()) |
109 | if res: | 110 | if res: |
@@ -123,6 +124,9 @@ def read_workspace(): | |||
123 | elif line.startswith('# srctreebase: '): | 124 | elif line.startswith('# srctreebase: '): |
124 | pnvalues['srctreebase'] = line.split(':', 1)[1].strip() | 125 | pnvalues['srctreebase'] = line.split(':', 1)[1].strip() |
125 | if pnvalues: | 126 | if pnvalues: |
127 | if not pn: | ||
128 | raise DevtoolError("Found *.bbappend in %s, but could not determine EXTERNALSRC:pn-*. " | ||
129 | "Maybe still using old syntax?" % config.workspace_path) | ||
126 | if not pnvalues.get('srctreebase', None): | 130 | if not pnvalues.get('srctreebase', None): |
127 | pnvalues['srctreebase'] = pnvalues['srctree'] | 131 | pnvalues['srctreebase'] = pnvalues['srctree'] |
128 | logger.debug('Found recipe %s' % pnvalues) | 132 | logger.debug('Found recipe %s' % pnvalues) |
@@ -314,10 +318,10 @@ def main(): | |||
314 | 318 | ||
315 | args = parser.parse_args(unparsed_args, namespace=global_args) | 319 | args = parser.parse_args(unparsed_args, namespace=global_args) |
316 | 320 | ||
317 | if not getattr(args, 'no_workspace', False): | ||
318 | read_workspace() | ||
319 | |||
320 | try: | 321 | try: |
322 | if not getattr(args, 'no_workspace', False): | ||
323 | read_workspace() | ||
324 | |||
321 | ret = args.func(args, config, basepath, workspace) | 325 | ret = args.func(args, config, basepath, workspace) |
322 | except DevtoolError as err: | 326 | except DevtoolError as err: |
323 | if str(err): | 327 | if str(err): |