Bug 12831

Summary: Typo in python3-reprlib does not include correct files in package
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Tim Burke <tim>
Component: devtools / tool chainAssignee: Armin Kuster <akuster>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: Medium CC: meta.mr.watcher, meta.watcher, ross.burton, tim
Version: 2.4.5   
Target Milestone: 2.4.4   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Tim Burke 2018-06-29 02:18:56 UTC
The python-3.5-manifest.inc file used to define packages for the python3 stdlib modules has a typo that incorrectly lists the files that should be included in the python3-reprlib package.  In particular, it does not include the *.pyc files due to what appears to be a copy-paste error.

This doesn't appear to have any impact on a normal build since the missing files are still packaged up in python3-misc so they still get installed.

I hit this issue when trying to remove extraneous uncompiled *.py files in the stdlib to save space.  Since the python3-reprlib package consists only of *.py files (because it omits the *.pyc file), splitting the *.py files into a new python3-src package caused python3-reprlib to be empty.  However, python3-core depends on it, leading to the overall image generation failing.

The line in question is linked here:
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/python/python-3.5-manifest.inc?h=rocko#n196

In particular it reads:
FILES_${PN}-reprlib="${libdir}/python3.5/reprlib.py ${libdir}/python3.5/__pycache__/reprlib.py "

I believe it should be instead:
FILES_${PN}-reprlib="${libdir}/python3.5/reprlib.py ${libdir}/python3.5/__pycache__/reprlib.*"

Note the difference where the current line looks for a .py file inside which __pycache__ which is not present rather than looking for the compiled *.pyc file.

I based this proposed delta on an analogy with the python3-signal package:
FILES_${PN}-signal="${libdir}/python3.5/signal.* ${libdir}/python3.5/__pycache__/signal.* "
Comment 1 Ross Burton 2018-11-08 16:14:41 UTC
As this refers to the manifest.inc it doesn't apply to 2.5 onwards, which uses a new manifest which doesn't have this problem (reprlib is part of python3-core there).
Comment 2 Richard Purdie 2018-11-13 10:35:43 UTC
Patch queued in rocko-next, over to Armin.
Comment 3 Armin Kuster 2018-11-13 16:45:22 UTC
in rocko-nmut for building
Comment 5 Armin Kuster 2018-11-27 14:56:01 UTC
checked in
Comment 6 Armin Kuster 2018-11-27 14:56:13 UTC
done