Patchwork lib/oe/utils.py: use bb.utils.vercmp_string

login
register
mail settings
Submitter Andreas Oberritter
Date Feb. 23, 2012, 8:46 p.m.
Message ID <1330029973-15207-1-git-send-email-obi@opendreambox.org>
Download mbox | patch
Permalink /patch/21859/
State Accepted
Commit 925a9729afaa9cd498661f7f363112c974b023a2
Headers show

Comments

Andreas Oberritter - Feb. 23, 2012, 8:46 p.m.
Fixes the following warning:

| WARNING: .../meta/lib/oe/utils.py:31: DeprecationWarning: Call to deprecated function bb.vercmp_string: Please use bb.utils.vercmp_string instead.
|  result = bb.vercmp(d.getVar(variable,True), checkvalue)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta/lib/oe/utils.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Richard Purdie - Feb. 23, 2012, 11:51 p.m.
On Thu, 2012-02-23 at 21:46 +0100, Andreas Oberritter wrote:
> Fixes the following warning:
> 
> | WARNING: .../meta/lib/oe/utils.py:31: DeprecationWarning: Call to deprecated function bb.vercmp_string: Please use bb.utils.vercmp_string instead.
> |  result = bb.vercmp(d.getVar(variable,True), checkvalue)
> 
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> ---
>  meta/lib/oe/utils.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 95daace..02d5442 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -28,7 +28,7 @@  def less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
         return falsevalue
 
 def version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
-    result = bb.vercmp(d.getVar(variable,True), checkvalue)
+    result = bb.utils.vercmp_string(d.getVar(variable,True), checkvalue)
     if result <= 0:
         return truevalue
     else: