[elbe-devel] [PATCH] Fix cp and mv command in finetuning

Manuel Traut manuel.traut at linutronix.de
Wed Jun 14 11:16:40 CEST 2017


Hi Philipp,

> Now finetuning commands like
> `<cp path="/usr/lib/u-boot/u*">/boot</cp>`
> are supported. Previously, elbe did not understand placeholders like `*`.

nice.

Can you also add this to buildenv_cp, b2t_cp, t2b_cp, t2p_mv, buildenv_mv?

Thx,
  Manuel

> ---
>  elbepack/finetuning.py | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/elbepack/finetuning.py b/elbepack/finetuning.py
> index de19f7e..03946d0 100644
> --- a/elbepack/finetuning.py
> +++ b/elbepack/finetuning.py
> @@ -114,7 +114,9 @@ class CpAction(FinetuningAction):
>          FinetuningAction.__init__(self, node)
>  
>      def execute(self, log, buildenv, target):
> -        log.do( "cp -av " + target.fname( self.node.et.attrib['path'] ) + " " + target.fname( self.node.et.text ) )
> +        src = target.glob(self.node.et.attrib['path'])
> +        for f in src:
> +            log.do("cp -av " + f + " " + target.fname(self.node.et.text))
>  
>  FinetuningAction.register( CpAction )
>  
> @@ -179,7 +181,9 @@ class MvAction(FinetuningAction):
>          FinetuningAction.__init__(self, node)
>  
>      def execute(self, log, buildenv, target):
> -        log.do( "mv -v " + target.fname( self.node.et.attrib['path'] ) + " " + target.fname( self.node.et.text ) )
> +        src = target.glob(self.node.et.attrib['path'])
> +        for f in src:
> +            log.do("mv -v " + f + " " + target.fname(self.node.et.text))
>  
>  FinetuningAction.register( MvAction )
>  
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel




More information about the elbe-devel mailing list