Bug 8730 - separate code generating python manifest file from manifest information and improve the manifest generation
Summary: separate code generating python manifest file from manifest information and i...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.0
Hardware: All Multiple
: Medium enhancement
Target Milestone: 2.5 M2
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-11-26 18:22 UTC by wrobell
Modified: 2018-01-22 14:15 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Manifest generation code (1.63 KB, text/x-python)
2015-11-26 18:22 UTC, wrobell
no flags Details
Python 3.5 manifest data (16.32 KB, application/json)
2015-11-26 18:22 UTC, wrobell
no flags Details
Manifest generation code (1.63 KB, text/x-python)
2015-11-26 21:00 UTC, wrobell
no flags Details
Python 3.5 manifest data (17.49 KB, application/json)
2015-11-26 21:01 UTC, wrobell
no flags Details
Manifest generation code (1.63 KB, text/x-python)
2015-11-26 21:02 UTC, wrobell
no flags Details
Manifest generation script (python 2 and py3k compatible) (1.76 KB, text/x-python)
2015-11-26 23:48 UTC, wrobell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.