summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-08-02 10:23:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-06 15:29:46 +0100
commit507dba64e0d997ec187b218a7a8b5f883908d158 (patch)
treeb626a75189ff861ff23b8807448975a5b4e5c6f6
parent81485a47d53e121ac3d8f27e225f7fa8fb7c3bf7 (diff)
downloadpoky-507dba64e0d997ec187b218a7a8b5f883908d158.tar.gz
poky-507dba64e0d997ec187b218a7a8b5f883908d158.tar.bz2
poky-507dba64e0d997ec187b218a7a8b5f883908d158.zip
buildhistory_analysis: tidy up duplicate split_version function
This function is now provided by bb.utils and since we have now bumped the minimum bitbake version, we can switch to that one instead. (From OE-Core rev: 67a4d15f0a8032190e92026677150162a492a053) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/buildhistory_analysis.py20
1 files changed, 1 insertions, 19 deletions
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index 55bd7b769d..a1a04085c2 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -261,24 +261,6 @@ def compare_lists(alines, blines):
return filechanges
-def split_version(s):
- """Split a version string into its constituent parts (PE, PV, PR)
- FIXME: this is a duplicate of a new function in bitbake/lib/bb/utils -
- we should switch to that once we can bump the minimum bitbake version
- """
- s = s.strip(" <>=")
- e = 0
- if s.count(':'):
- e = int(s.split(":")[0])
- s = s.split(":")[1]
- r = ""
- if s.count('-'):
- r = s.rsplit("-", 1)[1]
- s = s.rsplit("-", 1)[0]
- v = s
- return (e, v, r)
-
-
def compare_pkg_lists(astr, bstr):
depvera = bb.utils.explode_dep_versions(astr)
depverb = bb.utils.explode_dep_versions(bstr)
@@ -290,7 +272,7 @@ def compare_pkg_lists(astr, bstr):
dva = depvera[k]
dvb = depverb[k]
if dva and dvb and dva != dvb:
- if bb.utils.vercmp(split_version(dva), split_version(dvb)) < 0:
+ if bb.utils.vercmp(bb.utils.split_version(dva), bb.utils.split_version(dvb)) < 0:
remove.append(k)
for k in remove: