Bug 539635 - Noise from brp-python-bytecompile for non-python packages
Noise from brp-python-bytecompile for non-python packages
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
Depends On:
Blocks: Python3F13
  Show dependency treegraph
Reported: 2009-11-20 13:39 EST by Dave Malcolm
Modified: 2009-12-08 09:39 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 557607 (view as bug list)
Last Closed: 2009-12-08 09:39:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dave Malcolm 2009-11-20 13:39:36 EST
From: https://www.redhat.com/archives/fedora-devel-list/2009-November/msg01536.html

On Fri, 2009-11-20 at 09:53 -0700, Jerry James wrote:
I'm looking into the build failures Matt identified.  With my shiny
> new Rawhide VM, I'm seeing this output on a local build of a package
> with no python sources:
> [ ... successful build messages ...]
> + /usr/lib/rpm/brp-python-bytecompile
> Bytecompiling .py files below [BUILDROOT]/usr/lib*/python*/ using
> /usr/bin/python*
> Usage: /usr/bin/python-config
> [--prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--help]
> Usage: /usr/bin/python-config
> [--prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--help]
> + /usr/lib/rpm/redhat/brp-python-hardlink
> [ ... successful build messages ...]
> The rpm build is completing, so I'm not worried about this particular
> package.  Is this going to cause problems with packages that do have
> python sources, or is this just because nothing matches
> /usr/lib*/python*/ in the build root?  It looks like python_binary =
> /usr/bin/python*, which can match any of these:
> /usr/bin/python
> /usr/bin/python-config
> /usr/bin/python2
> /usr/bin/python2.6
> /usr/bin/python2.6-config
Sorry; looks like my fault.

I updated /usr/lib/rpm/brp-python-bytecompile to better cope with the python 2 vs python 3 split; this was in bug 531117.

From my reading, what's happening is that I coded it with the (incorrect) assumption that files exist which match   

When at least one such file exists, I believe the shell expands the glob and thus we iterate over the library subdirectories, byte-compiling all .py files in them with the appropriate version of python.

When no such directory exists, the shell fails to expand it, and retains it as the text string:
and thus one iteration of that loop happens, and we get the two error messages.

So I believe this is harmless but messy.
Comment 1 Panu Matilainen 2009-12-08 09:39:27 EST
Harmless but ugly... fixed in rpm-4.8.0-0.beta1.2

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