diff mbox series

[meta-swupdate] Use backward compatible syntax for `getVar()`

Message ID 1516996823-28714-1-git-send-email-dmitri@toubelis.org
State Accepted
Headers show
Series [meta-swupdate] Use backward compatible syntax for `getVar()` | expand

Commit Message

dmitri@toubelis.org Jan. 26, 2018, 8 p.m. UTC
From: Dmitri Toubelis <dmitri.toubelis@litmusautomation.com>

Signed-off-by: Dmitri Toubelis <dmitri.toubelis@litmusautomation.com>
---
 recipes-support/swupdate/swupdate_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stefano Babic Jan. 30, 2018, 3:17 p.m. UTC | #1
On 26/01/2018 21:00, dmitri@toubelis.org wrote:
> From: Dmitri Toubelis <dmitri.toubelis@litmusautomation.com>
> 
> Signed-off-by: Dmitri Toubelis <dmitri.toubelis@litmusautomation.com>
> ---
>  recipes-support/swupdate/swupdate_git.bb | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/recipes-support/swupdate/swupdate_git.bb b/recipes-support/swupdate/swupdate_git.bb
> index 4fc15ad..d23b965 100644
> --- a/recipes-support/swupdate/swupdate_git.bb
> +++ b/recipes-support/swupdate/swupdate_git.bb
> @@ -11,9 +11,9 @@ DEFAULT_PREFERENCE = "-1"
>  # In casethe _git version is chosen, sets the revision
>  # to TOT to test with last commit-id.
>  def version_git(d):
> -    version = d.getVar("PREFERRED_VERSION_%s" % d.getVar('PN'))
> +    version = d.getVar("PREFERRED_VERSION_%s" % d.getVar('PN', False), False)
>      if version is not None and "git" in version:
> -        return d.getVar("AUTOREV")
> +        return d.getVar('AUTOREV', False)
>      else:
>          return "c0fec16b3fc82b0db12d8ac58be7055ed1b8d439"
>  
> 

Applied to -master, -rocko, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/recipes-support/swupdate/swupdate_git.bb b/recipes-support/swupdate/swupdate_git.bb
index 4fc15ad..d23b965 100644
--- a/recipes-support/swupdate/swupdate_git.bb
+++ b/recipes-support/swupdate/swupdate_git.bb
@@ -11,9 +11,9 @@  DEFAULT_PREFERENCE = "-1"
 # In casethe _git version is chosen, sets the revision
 # to TOT to test with last commit-id.
 def version_git(d):
-    version = d.getVar("PREFERRED_VERSION_%s" % d.getVar('PN'))
+    version = d.getVar("PREFERRED_VERSION_%s" % d.getVar('PN', False), False)
     if version is not None and "git" in version:
-        return d.getVar("AUTOREV")
+        return d.getVar('AUTOREV', False)
     else:
         return "c0fec16b3fc82b0db12d8ac58be7055ed1b8d439"