[oe-commits] [bitbake] branch master updated: utils.py: Add option for explode_dep_versions2 to return unsorted

git at git.openembedded.org git at git.openembedded.org
Thu Mar 15 10:53:19 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository bitbake.

The following commit(s) were added to refs/heads/master by this push:
     new 39d6a30  utils.py: Add option for explode_dep_versions2 to return unsorted
39d6a30 is described below

commit 39d6a30a28f66c599e18beddbd847f40dcff623c
Author: Amanda Brindle <amanda.r.brindle at intel.com>
AuthorDate: Mon Mar 5 11:11:52 2018 -0800

    utils.py: Add option for explode_dep_versions2 to return unsorted
    
    Before, explode_dep_versions2 would sort the OrderedDict before
    returning. This function will still sort the OrderedDict by default, but
    will now have the option to return the OrderedDict unsorted. This option will
    allow us to check if the order of the package list has changed.
    
    Signed-off-by: Amanda Brindle <amanda.r.brindle at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/utils.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index c540b49..8b739d7 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -187,7 +187,7 @@ def explode_deps(s):
             #r[-1] += ' ' + ' '.join(j)
     return r
 
-def explode_dep_versions2(s):
+def explode_dep_versions2(s, *, sort=True):
     """
     Take an RDEPENDS style string of format:
     "DEPEND1 (optional version) DEPEND2 (optional version) ..."
@@ -250,7 +250,8 @@ def explode_dep_versions2(s):
         if not (i in r and r[i]):
             r[lastdep] = []
 
-    r = collections.OrderedDict(sorted(r.items(), key=lambda x: x[0]))
+    if sort:
+        r = collections.OrderedDict(sorted(r.items(), key=lambda x: x[0]))
     return r
 
 def explode_dep_versions(s):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list