Bug 8730

Summary: separate code generating python manifest file from manifest information and improve the manifest generation
Product: [Build System, Metadata & Runtime] OE-Core Reporter: wrobell
Component: devtools / tool chainAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: alejandro.hernandez, benjamin.esquivel, leonardo.sandoval.gonzalez, meta.mr.watcher, meta.watcher, wrobell
Version: 2.0   
Target Milestone: 2.5 M2   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Manifest generation code
none
Python 3.5 manifest data
none
Manifest generation code
none
Python 3.5 manifest data
none
Manifest generation code
none
Manifest generation script (python 2 and py3k compatible) none

Description wrobell 2015-11-26 18:22:12 UTC
Created attachment 2868 [details]
Manifest generation code

Python manifest file is generated with generate-manifest-*.py scripts.

The scripts have several issues

- very long manifest lines are generated, so mailing list is rejecting
  each patch against the manifest file (I was requested once to send
  patch against both the manifest generation code and the generated manifest
  file as well)
- the script has 388 lines and 381 PEP-8 violations
- the manifest input data and code is coupled together, so we need new
  script for different versions of python (2.7 vs. 3.x)

I am attaching rewritten script, which uses separate manifest
input file (in JSON format). The attached manifest file is for
Python 3.5 (should work for Python 3.4 as well).

Usage:

    $ python2 ./generate-manifest.py < python-3.5-manifest-input.json > python-3.5-manifest.inc

The script itself requires Python 3.x.
Comment 1 wrobell 2015-11-26 18:22:41 UTC
Created attachment 2869 [details]
Python 3.5 manifest data
Comment 2 wrobell 2015-11-26 21:00:58 UTC
Created attachment 2870 [details]
Manifest generation code
Comment 3 wrobell 2015-11-26 21:01:34 UTC
Created attachment 2871 [details]
Python 3.5 manifest data
Comment 4 wrobell 2015-11-26 21:02:40 UTC
Created attachment 2872 [details]
Manifest generation code
Comment 5 Paul Eggleton 2015-11-26 21:58:04 UTC
Hmm, just noticed - you say the script itself requires Python 3.x (which might be an issue for us, at least at the moment) but your example shows running it under python2... ?
Comment 6 wrobell 2015-11-26 23:48:10 UTC
Created attachment 2873 [details]
Manifest generation script (python 2 and py3k compatible)
Comment 7 wrobell 2015-11-26 23:49:38 UTC
the example of running the script - copy&paste from wrong terminal

anyway, attached new version of the manifest file generation script. this version works with both python 2 and py3k.
Comment 8 Jose Lamego 2017-03-13 20:38:06 UTC
Moving to 2.4 due to workload.
Comment 9 Leonardo Sandoval Gonzalez 2017-08-09 15:44:28 UTC
Alex, is this something already covered by your recent work on manifest generation?
Comment 10 Alejandro Hernandez 2017-08-09 15:50:59 UTC
(In reply to comment #9)
> Alex, is this something already covered by your recent work on manifest
> generation?

Yes, everything here will be covered, assigning it to me.
Comment 11 Alejandro Hernandez 2017-08-28 21:42:49 UTC
Done, but moving to 2.5 per Richard's request
Comment 12 Ross Burton 2018-01-22 14:15:49 UTC
Fixed in oe-core 3328211afdef8ffb00dd4dff1143959d5412b075.