diff mbox series

[1/6] devtool: ide: Fix topdir exception for fallback mode

Message ID 20240215170422.659073-2-enguerrand.de-ribaucourt@savoirfairelinux.com
State New
Headers show
Series devtool: ide: Improve VSCode support | expand

Commit Message

Enguerrand de Ribaucourt Feb. 15, 2024, 5:04 p.m. UTC
An exception was raised because we did not have the topdir attribute
which was used in fallback mode (non cmake/meson recipes).

Already in the merge queue in Adrian's latest patches.
---
 scripts/lib/devtool/ide_sdk.py | 1 +
 1 file changed, 1 insertion(+)

Comments

Adrian Freihofer Feb. 15, 2024, 11:02 p.m. UTC | #1
On Thu, 2024-02-15 at 18:04 +0100, Enguerrand de Ribaucourt wrote:
> An exception was raised because we did not have the topdir attribute
> which was used in fallback mode (non cmake/meson recipes).
> 
> Already in the merge queue in Adrian's latest patches.
> ---
>  scripts/lib/devtool/ide_sdk.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/lib/devtool/ide_sdk.py
> b/scripts/lib/devtool/ide_sdk.py
> index 3986dc1436a..db2e95616be 100755
> --- a/scripts/lib/devtool/ide_sdk.py
> +++ b/scripts/lib/devtool/ide_sdk.py
> @@ -366,6 +366,7 @@ class RecipeModified:
>          self.target_arch = recipe_d.getVar('TARGET_ARCH')
>          self.topdir = recipe_d.getVar('TOPDIR')
>          self.workdir = os.path.realpath(recipe_d.getVar('WORKDIR'))
> +        self.topdir = os.path.realpath(recipe_d.getVar('TOPDIR'))

I think this patch is not needed. Two lines above the variable is
already initialized.
Some time ago there was an exception but it is fixes on master-next
already.

>  
>          self.__init_exported_variables(recipe_d)
>
diff mbox series

Patch

diff --git a/scripts/lib/devtool/ide_sdk.py b/scripts/lib/devtool/ide_sdk.py
index 3986dc1436a..db2e95616be 100755
--- a/scripts/lib/devtool/ide_sdk.py
+++ b/scripts/lib/devtool/ide_sdk.py
@@ -366,6 +366,7 @@  class RecipeModified:
         self.target_arch = recipe_d.getVar('TARGET_ARCH')
         self.topdir = recipe_d.getVar('TOPDIR')
         self.workdir = os.path.realpath(recipe_d.getVar('WORKDIR'))
+        self.topdir = os.path.realpath(recipe_d.getVar('TOPDIR'))
 
         self.__init_exported_variables(recipe_d)