diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-10-03 13:37:15 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-03 13:44:52 +0100 |
commit | 1600c916ae410c57a783a5aa35abe07a3f673311 (patch) | |
tree | 80e7f35b6d958835d093336a89d60bb52088b301 /meta/lib | |
parent | f7365f62325189b0f9a9a1d440f11f2356c8f01d (diff) | |
download | openembedded-core-1600c916ae410c57a783a5aa35abe07a3f673311.tar.gz openembedded-core-1600c916ae410c57a783a5aa35abe07a3f673311.tar.bz2 openembedded-core-1600c916ae410c57a783a5aa35abe07a3f673311.zip |
buildhistory_analysis: update to use explode_dep_versions2()
Handle where multiple version specifications are present for the same
dependency.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/buildhistory_analysis.py | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py index a5a607e30b..ad57f00289 100644 --- a/meta/lib/oe/buildhistory_analysis.py +++ b/meta/lib/oe/buildhistory_analysis.py @@ -262,8 +262,8 @@ def compare_lists(alines, blines): def compare_pkg_lists(astr, bstr): - depvera = bb.utils.explode_dep_versions(astr) - depverb = bb.utils.explode_dep_versions(bstr) + depvera = bb.utils.explode_dep_versions2(astr) + depverb = bb.utils.explode_dep_versions2(bstr) # Strip out changes where the version has increased remove = [] @@ -271,8 +271,23 @@ def compare_pkg_lists(astr, bstr): if k in depverb: dva = depvera[k] dvb = depverb[k] - if dva and dvb and dva != dvb: - if bb.utils.vercmp(bb.utils.split_version(dva), bb.utils.split_version(dvb)) < 0: + if dva and dvb and len(dva) == len(dvb): + # Since length is the same, sort so that prefixes (e.g. >=) will line up + dva.sort() + dvb.sort() + removeit = True + for dvai, dvbi in zip(dva, dvb): + if dvai != dvbi: + aiprefix = dvai.split(' ')[0] + biprefix = dvbi.split(' ')[0] + if aiprefix == biprefix and aiprefix in ['>=', '=']: + if bb.utils.vercmp(bb.utils.split_version(dvai), bb.utils.split_version(dvbi)) > 0: + removeit = False + break + else: + removeit = False + break + if removeit: remove.append(k) for k in remove: |