diff mbox series

[meta-swupdate,v2] swupdate: Fix multilib depends

Message ID CH2PR20MB30941C47BED2EF262598F593C67E9@CH2PR20MB3094.namprd20.prod.outlook.com
State Accepted
Delegated to: Stefano Babic
Headers show
Series [meta-swupdate,v2] swupdate: Fix multilib depends | expand

Commit Message

Michael Gloff May 17, 2023, 7:07 p.m. UTC
Since oe-core edbf8d3999, anonymous python
must explicitly add MLPREFIX.

Signed-off-by: Michael Gloff <mgloff@hotmail.com>
---
 recipes-support/swupdate/swupdate.inc | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

Comments

Stefano Babic May 26, 2023, 7:06 a.m. UTC | #1
On 17.05.23 21:07, Michael Gloff wrote:
> Since oe-core edbf8d3999, anonymous python
> must explicitly add MLPREFIX.
> 
> Signed-off-by: Michael Gloff <mgloff@hotmail.com>
> ---

Applied to:

    f996a23..a2c1b8a  dunfell -> dunfell
    22e9aee..c5cbece  kirkstone -> kirkstone
    b99d990..8a04255  langdale -> langdale
    cec748f..709248b  master -> master
    31c4405..36a3cf0  mickledore -> mickledore

Best regards,
Stefano Babic

>   recipes-support/swupdate/swupdate.inc | 23 +++++++++++++++++++----
>   1 file changed, 19 insertions(+), 4 deletions(-)
> 
> diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc
> index faaf03d..efae4b1 100644
> --- a/recipes-support/swupdate/swupdate.inc
> +++ b/recipes-support/swupdate/swupdate.inc
> @@ -130,9 +130,10 @@ python () {
>       features = features.splitlines(True)
>   
>   
> -    depends = d.getVar('DEPENDS', False)
> +    depends = ''
>       pn = d.getVar('PN')
> -    rdepends = d.getVar("RDEPENDS:%s" % pn) or ""
> +    rdepends = ''
> +    mlprefix = d.getVar("MLPREFIX") or ""
>   
>       if 'CONFIG_REMOTE_HANDLER=y\n' in features:
>           depends += ' zeromq'
> @@ -188,8 +189,22 @@ python () {
>       if 'CONFIG_DELTA=y\n' in features:
>           depends += ' zchunk'
>   
> -    d.setVar('DEPENDS', depends)
> -    d.setVar("RDEPENDS:%s" % pn, rdepends)
> +    if mlprefix:
> +        deps = ' '
> +        rdeps = ' '
> +        for dep in depends.split():
> +            dep = mlprefix + dep + ' '
> +            deps += dep
> +
> +        for rdep in rdepends.split():
> +            rdep = mlprefix + dep + ' '
> +            rdeps += rdep
> +
> +        depends = deps
> +        repends = rdeps
> +
> +    d.appendVar('DEPENDS', depends)
> +    d.appendVar("RDEPENDS:%s" % pn, rdepends)
>   
>       if 'CONFIG_MONGOOSE=y\n' in features:
>           d.setVar('SWUPDATE_MONGOOSE', 'true')
diff mbox series

Patch

diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc
index faaf03d..efae4b1 100644
--- a/recipes-support/swupdate/swupdate.inc
+++ b/recipes-support/swupdate/swupdate.inc
@@ -130,9 +130,10 @@  python () {
     features = features.splitlines(True)
 
 
-    depends = d.getVar('DEPENDS', False)
+    depends = ''
     pn = d.getVar('PN')
-    rdepends = d.getVar("RDEPENDS:%s" % pn) or ""
+    rdepends = ''
+    mlprefix = d.getVar("MLPREFIX") or ""
 
     if 'CONFIG_REMOTE_HANDLER=y\n' in features:
         depends += ' zeromq'
@@ -188,8 +189,22 @@  python () {
     if 'CONFIG_DELTA=y\n' in features:
         depends += ' zchunk'
 
-    d.setVar('DEPENDS', depends)
-    d.setVar("RDEPENDS:%s" % pn, rdepends)
+    if mlprefix:
+        deps = ' '
+        rdeps = ' '
+        for dep in depends.split():
+            dep = mlprefix + dep + ' '
+            deps += dep
+
+        for rdep in rdepends.split():
+            rdep = mlprefix + dep + ' '
+            rdeps += rdep
+
+        depends = deps
+        repends = rdeps
+
+    d.appendVar('DEPENDS', depends)
+    d.appendVar("RDEPENDS:%s" % pn, rdepends)
 
     if 'CONFIG_MONGOOSE=y\n' in features:
         d.setVar('SWUPDATE_MONGOOSE', 'true')