Hi *,

On Fri, Oct 16, 2009 at 1:28 PM, Caolán McNamara <caol...@redhat.com> wrote:
> On Fri, 2009-10-16 at 16:09 +0530, abeesh k k kappiri wrote:
>> hai all
>> when building  OOO310_m19 from tcsh under fedora 8  pyhon version 2.5

A side-remark: I strongly suggest to use bash for building
(--with-use-shell=bash) .. Is there any specific reason why you're
using tcsh to compile OOo?

>> dmake fails as showing the following messages
>
>> /var/oo_new/OOO310_m19/solver/310/unxlngi6.pro/lib/python/site.py:150:
>> Warning: 'with' will become a reserved keyword in Python 2.6
>> 'import site' failed; use -v for traceback
>> Traceback (most recent call last):
>>   File "<string>", line 1, in <module>
>>   File 
>> "/var/oo_new/OOO310_m19/solver/310/unxlngi6.pro/lib/python/compileall.py",
>> line 15, in <module>
>>     import os
>>   File "/var/oo_new/OOO310_m19/solver/310/unxlngi6.pro/lib/python/os.py",
>> line 757
>>     bs = b""
>
> This has shown up before, see
> http://www.mail-archive.com/dev@tools.openoffice.org/msg01379.html
> as a hackaround you can try and remove the line
>
>    /usr/lib/rpm/brp-python-bytecompile \
>
> from /usr/lib/rpm/redhat/macros


To selectively remove the python-bytecompile one only for the affected
sysui module, you can use the following patch:

Index: sysui/desktop/tg_rpm.mk
===================================================================
--- sysui/desktop/tg_rpm.mk     (revision 272948)
+++ sysui/desktop/tg_rpm.mk     (working copy)
@@ -31,6 +31,20 @@

 .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/rpm//)"

+.IF "$(SYSTEM_PYTHON)"=="NO"
+# trying to precompile python stuff most likely fails, since system
version and OOo version don't match
+# running it with OOo's python parameter doesn't work, becuae
LIBRARY_PATH cannot be setup accordingly since
+# otherwise Fedora's rpm would choke because of OOo's version of libnss...
+# Only way is to disable the call from os_install_post. Unfortunately
it is hardcoded on fedora, so it is not enough to just
+# set a variable to false, but one has to parse the list of commands
to run and pass it to rpm again with the item removed
+# (which ain't that easy because it is a multi-value field with
newlines where one needs to use rpm's echo macro)
+
+# shell-call flattens the output, add \n escape sequences to be able
to unflat it later
+OS_INSTALL_POST:=$(shell rpm --eval %__os_install_post | sed -e
'/brp-python/d' -e 's/$$/\\n/')
+
+RPMMACROS+=--define "__os_install_post %(echo \"$(OS_INSTALL_POST:m)\")"
+.ENDIF
+
 ALLTAR : $(RPMFLAGFILES)

 $(RPMFLAGFILES) : $(SPECFILE)

But this is really a rather over-engineered solution, since the
install-post stuff doesn't do any useful with the desktop-integration
rpms anyway, so just defining it to %{nil} (or /bin/true) instead of
removing the python one only is a more sane solution.

ciao
Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tools.openoffice.org
For additional commands, e-mail: dev-h...@tools.openoffice.org

Reply via email to