Bug 182498 - Unnecessary byte-compilation of python scripts in /usr/bin
Unnecessary byte-compilation of python scripts in /usr/bin
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
bzcl34nup
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-22 16:39 EST by Ville Skyttä
Modified: 2009-03-07 03:37 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-07 03:37:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ville Skyttä 2006-02-22 16:39:53 EST
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 16:38:23 EST
It might also be worth considering naming things *.py in /bin we have #! magic
for a reason...
Comment 2 Ville Skyttä 2006-02-23 16:45:35 EST
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 12:13:26 EDT
Changing component to rpm as the script is in rpm-build, not redhat-rpm-config.
Comment 4 Panu Matilainen 2007-08-22 02:34:45 EDT
Reassigning to owner after bugzilla made a mess, sorry about the noise...
Comment 5 Bug Zapper 2008-04-03 13:00:47 EDT
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:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

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 14:43:33 EDT
Yes, still happens with current Rawhide, rpm-4.4.2.3-1.fc9.x86_64
Comment 7 Bug Zapper 2008-05-13 22:06:00 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Panu Matilainen 2009-02-05 05:22:21 EST
Fixed upstream now, bin and sbin directories are excluded from byte compilation.
Comment 9 Parag AN(पराग) 2009-03-05 02:57:40 EST
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 03:37:18 EST
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.