summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@gmail.com>2018-09-19 09:22:28 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-21 18:45:46 -0700
commitb0ce2e842a4f36672d2aab424d63b09e31eec048 (patch)
tree793f41cae0160eee4cabef74051b6c2fd1a63991 /meta/recipes-devtools/python
parentb0f5feea01646613626fca99b8e632ab712eaca2 (diff)
downloadpoky-b0ce2e842a4f36672d2aab424d63b09e31eec048.tar.gz
python: respect package order in manifest
Don't sort the manifest when using it to generate packaging rules, so ordering can be used to have complex packaging rules. This is a backport of the same changes done by Ross Burton for python3 Changes since v1: - Rebase (From OE-Core rev: 5a5a97b1c3914ad4a3e94981bf53897d0a3f4fb3) Signed-off-by: Andrew Geissler <geissonator@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python')
-rw-r--r--meta/recipes-devtools/python/python_2.7.15.bb6
1 files changed, 2 insertions, 4 deletions
diff --git a/meta/recipes-devtools/python/python_2.7.15.bb b/meta/recipes-devtools/python/python_2.7.15.bb
index 43d9ff5152..472c1da4bf 100644
--- a/meta/recipes-devtools/python/python_2.7.15.bb
+++ b/meta/recipes-devtools/python/python_2.7.15.bb
@@ -207,7 +207,7 @@ RPROVIDES_${PN} += "${PN}-modules"
207INCLUDE_PYCS ?= "1" 207INCLUDE_PYCS ?= "1"
208 208
209python(){ 209python(){
210 import json 210 import collections, json
211 211
212 filename = os.path.join(d.getVar('THISDIR'), 'python', 'python2-manifest.json') 212 filename = os.path.join(d.getVar('THISDIR'), 'python', 'python2-manifest.json')
213 # This python changes the datastore based on the contents of a file, so mark 213 # This python changes the datastore based on the contents of a file, so mark
@@ -215,7 +215,7 @@ python(){
215 bb.parse.mark_dependency(d, filename) 215 bb.parse.mark_dependency(d, filename)
216 216
217 with open(filename) as manifest_file: 217 with open(filename) as manifest_file:
218 python_manifest=json.load(manifest_file) 218 python_manifest=json.load(manifest_file, object_pairs_hook=collections.OrderedDict)
219 219
220 include_pycs = d.getVar('INCLUDE_PYCS') 220 include_pycs = d.getVar('INCLUDE_PYCS')
221 221
@@ -248,8 +248,6 @@ python(){
248 d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value) 248 d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)
249 d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary']) 249 d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])
250 250
251 # We need to ensure staticdev packages match for files first so we sort in reverse
252 newpackages.sort(reverse=True)
253 # Prepending so to avoid python-misc getting everything 251 # Prepending so to avoid python-misc getting everything
254 packages = newpackages + packages 252 packages = newpackages + packages
255 d.setVar('PACKAGES', ' '.join(packages)) 253 d.setVar('PACKAGES', ' '.join(packages))