Users are surprised when dirs/cleandirs aren't acted upon for
empty functions. This reorders the code slightly so that those
flags are acted upon for empty functions as there are cases where
this is expected.
[YOCTO #10256]
(Bitbake rev:
5bf874673d75b5f4ff2b34f0ab8502558ee84d00)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
except:
oldcwd = None
- body = d.getVar(func, False)
- if not body:
- if body is None:
- logger.warning("Function %s doesn't exist", func)
- return
-
flags = d.getVarFlags(func)
cleandirs = flags.get('cleandirs')
if cleandirs:
adir = dirs[-1]
else:
adir = None
+
+ body = d.getVar(func, False)
+ if not body:
+ if body is None:
+ logger.warning("Function %s doesn't exist", func)
+ return
+
ispython = flags.get('python')
lockflag = flags.get('lockfiles')