[PATCH] build: Place cache file in build directory

Karel Gardas karel.gardas at centrum.cz
Mon Nov 9 20:49:45 UTC 2020


Hello Sebastian,

sorry for late warning, but this patch breaks wscript on Ubuntu 20.04
LTS. It looks like bldnode is not part of the ctx variable. At least
bsp_defaults and bsp_list commands are broken by it. The output looks as:

$ ./waf bsp_list
Traceback (most recent call last):
  File
"/export/home/karel/git/rtems/rtems-head/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Scripting.py",
line 119, in waf_entry_point
    run_commands()
  File
"/export/home/karel/git/rtems/rtems-head/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Scripting.py",
line 182, in run_commands
    ctx=run_command(cmd_name)
  File
"/export/home/karel/git/rtems/rtems-head/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Scripting.py",
line 173, in run_command
    ctx.execute()
  File
"/export/home/karel/git/rtems/rtems-head/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Context.py",
line 92, in execute
    self.recurse([os.path.dirname(g_module.root_path)])
  File
"/export/home/karel/git/rtems/rtems-head/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Context.py",
line 133, in recurse
    user_function(self)
  File "/export/home/karel/git/rtems/rtems-head/wscript", line 1564, in
bsp_list
    load_items_from_options(ctx)
  File "/export/home/karel/git/rtems/rtems-head/wscript", line 1202, in
load_items_from_options
    load_items(ctx, specs)
  File "/export/home/karel/git/rtems/rtems-head/wscript", line 1193, in
load_items
    load_items_in_directory(ctx, ctors, path)
  File "/export/home/karel/git/rtems/rtems-head/wscript", line 1138, in
load_items_in_directory
    f = ctx.bldnode.make_node(
AttributeError: 'Context' object has no attribute 'bldnode'


The error is the same and independent of python2/python3 execution.
Reverting the patch helps here.

Thanks,
Karel

On 11/5/20 4:59 PM, Sebastian Huber wrote:
> This improves support for the --out option.
> ---
>  wscript | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/wscript b/wscript
> index 57ec6ff7f7..5f6958dbf3 100755
> --- a/wscript
> +++ b/wscript
> @@ -1135,8 +1135,8 @@ def load_from_yaml(load, ctx, data_by_uid, base, path):
>  
>  
>  def load_items_in_directory(ctx, ctors, path):
> -    f = ctx.path.make_node(
> -        "build/c4che/" + re.sub(r"[^\w]", "_", path) + ".pickle"
> +    f = ctx.bldnode.make_node(
> +        "c4che/" + re.sub(r"[^\w]", "_", path) + ".pickle"
>      )
>      f.parent.mkdir()
>      cache_file = f.abspath()
> 



More information about the devel mailing list