Bug 182498 - Unnecessary byte-compilation of python scripts in /usr/bin
Summary: Unnecessary byte-compilation of python scripts in /usr/bin
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
Whiteboard: bzcl34nup
Depends On:
TreeView+ depends on / blocked
Reported: 2006-02-22 21:39 UTC by Ville Skyttä
Modified: 2009-03-07 08:37 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-03-07 08:37:18 UTC
Type: ---

Attachments (Terms of Use)

Description Ville Skyttä 2006-02-22 21:39:53 UTC
brp-python-bytecompile byte-compiles also executable scripts in /usr/bin.  There
should be no reason to do that; python won't byte-compile the invoked scripts to
disk either.  This results in unneeded junk in the bin dirs, for example on my
Rawhide box:

$ ls /usr/bin/*.py?
/usr/bin/exif.pyc  /usr/bin/games-server.pyc  /usr/bin/orient.pyc
/usr/bin/exif.pyo  /usr/bin/games-server.pyo  /usr/bin/orient.pyo

I'm not sure of the best approach to fix this, but limiting the byte compilation
to things below /usr/lib, /usr/lib64, and /usr/share could be worth considering.

Comment 1 Paul Nasrat 2006-02-23 21:38:23 UTC
It might also be worth considering naming things *.py in /bin we have #! magic
for a reason...

Comment 2 Ville Skyttä 2006-02-23 21:45:35 UTC
Yep, agreed, but I think not byte-compiling them would still be useful as
renaming things may cause need for unnecessary patchwork for package maintainers
or upstream doc deviation etc.

Comment 3 Ville Skyttä 2007-05-25 16:13:26 UTC
Changing component to rpm as the script is in rpm-build, not redhat-rpm-config.

Comment 4 Panu Matilainen 2007-08-22 06:34:45 UTC
Reassigning to owner after bugzilla made a mess, sorry about the noise...

Comment 5 Bug Zapper 2008-04-03 17:00:47 UTC
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

Comment 6 Ville Skyttä 2008-04-03 18:43:33 UTC
Yes, still happens with current Rawhide, rpm-

Comment 7 Bug Zapper 2008-05-14 02:06:00 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:

Comment 8 Panu Matilainen 2009-02-05 10:22:21 UTC
Fixed upstream now, bin and sbin directories are excluded from byte compilation.

Comment 9 Parag AN(पराग) 2009-03-05 07:57:40 UTC
I thought this is fixed but koji as well as local rawhide build failed and still generating .pyo and .pyc in /usr/bin

Comment 10 Panu Matilainen 2009-03-07 08:37:18 UTC
Upstream != rawhide, but it is in rawhide too now.

Note You need to log in before you can comment on or make changes to this bug.