Mailinglist Archive: opensuse-factory (368 mails)

< Previous Next >
Re: [opensuse-factory] build error help please
  • From: Pascal Bleser <pascal.bleser@xxxxxxxxxxxx>
  • Date: Thu, 5 Jan 2012 20:23:14 +0100
  • Message-id: <20120105192314.GA31760@hera>
On 2012-01-05 13:17:11 (-0500), Robert Schweikert <rjschwei@xxxxxxxx> wrote:
Hi,

Could someone please help me to resolve the following error?

RPMLINT report:
===============
(none): E: badness 10000 exceeds threshold 1000, aborting.
euca2ools.noarch: E: file-contains-buildroot (Badness: 10000)
/usr/lib/python2.7/site-packages/euca2ools/__init__.pyc
Your file contains traces of $RPM_BUILD_ROOT.

https://build.opensuse.org/package/live_build_log?arch=x86_64&package=euca2ools&project=devel%3AopenSUSE%3AFactory&repository=snapshot

Have no clue what to do. Also the build succeeds locally on a 12.1
system, of course....

That is a build system bug in any case. Probably works on 12.1
because the rpmlint checks didn't catch it there.

Typically, that may happen with compiled python bytecode files
(.pyc and/or .pyo) when the upstream build system does not
correctly account for a %{buildroot}.

I usually resort to re-compiling the python files correctly
myself... not ideal, but works, and easier than finding out how
to fix setup.py accordingly ;)

After your
%__python ./setup.py build

Do this:
find "%{buildroot}%{python_sitelib}/" -name '*.pyc' \
-exec %__rm {} \;
%__python -c 'import compileall;
compileall.compile_dir("%{buildroot}%{python_sitelib}/",
ddir="%{python_sitelib}/",
force=1)'

hth
--
-o) Pascal Bleser
/\\ http://opensuse.org -- we haz green
_\_v http://fosdem.org -- we haz conf
< Previous Next >
Follow Ups
References