On Mon, 2024-09-30 at 15:30 +0200, Roland Hieber via lists.openembedded.org 
wrote:
> The 'srctree' argument might point to an existing source directory, and
> 'devtool modify' without '--no-extract' given (maybe because of the
> user's forgetfulness or inexperience) will override its content without
> futher warning. Catch this accidental use case, and prompt the user to
> specify '--no-extract' if this source tree should be used.
> 
> Signed-off-by: Roland Hieber <[email protected]>
> ---
> Note: this patch was developed on kirkstone and will probably also apply
> on scarthgap.
> 
>  scripts/lib/devtool/standard.py | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
> index b2e1a6ca3a5e..5354f298f598 100644
> --- a/scripts/lib/devtool/standard.py
> +++ b/scripts/lib/devtool/standard.py
> @@ -790,6 +790,10 @@ def modify(args, config, basepath, workspace):
>                              "not exist or is not a directory" %
>                              srctree)
>  
> +        if not args.no_extract and os.path.isdir(srctree):
> +            raise DevtoolError("Source path %s already exists. Did you mean 
> to "
> +                               "specify --no-extract?" % srctree)
> +
>          recipefile = rd.getVar('FILE')
>          appendfile = recipe_to_append(recipefile, config, args.wildcard)
>          if os.path.exists(appendfile):
> 

This causes most of the devtool tests to fail:

https://valkyrie.yoctoproject.org/#/builders/48/builds/130/steps/14/logs/stdio

(oe-selftest -r devtool)

This does make me worry that combination of options is used quite commonly.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#205153): 
https://lists.openembedded.org/g/openembedded-core/message/205153
Mute This Topic: https://lists.openembedded.org/mt/108735796/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to