Bug 37037 - Pyuno broken under certain circumstances
Summary: Pyuno broken under certain circumstances
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.3.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-09 14:57 UTC by Francisco Pina Martins
Modified: 2011-12-22 06:53 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Patch to correct pyuno bug (601 bytes, patch)
2011-05-09 14:57 UTC, Francisco Pina Martins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francisco Pina Martins 2011-05-09 14:57:31 UTC
Created attachment 46511 [details]
Patch to correct pyuno bug

I am using ArchLinux (x86_64) and I am having issues with pyuno.
I cannot make it work properly. Here's how to reproduce:

$export PYTHONPATH=/usr/lib/libreoffice/basis-link/program
$export LD_LIBRARY_PATH=/usr/lib/libreoffice/basis-link/program:/usr/lib/libreoffice/basis-link/ure-link/lib
$export URE_BOOTSTRAP=file:///usr/lib/libreoffice/program/fundamentalrc
$python
>>> import uno
>>> from com.sun.star.util import URL
(1st error)
>>> uno.getClass("com.sun.star.util.URL")
(error again)

The affected file is /usr/lib/libreoffice/basis3.3/program/uno.py (in the installed package). 
I have made a patch that corrects the problem and seems to make everything fine (in attachment). The patch applies to the mentioned file, but I cannot seem to find it in the source files. I'm sorry I cannot be more precise about it.

I have reported this bug on the Arch bugtracker and I was recommended to report it here too. 
https://bugs.archlinux.org/task/23733?opened=5011&type[0]=&sev[0]=&due[0]=&cat[0]=&status[0]=open&percent[0]=&reported[0]=

I hope this will help improve libreoffice.
Comment 1 Noel Power 2011-05-11 06:40:13 UTC
can you try with beta4 btw I don't see any of those lines ( os.environ ) in uno.py in libreoffice 3.4-beta4
following the instructions about and I don't get any errors
Comment 2 Francisco Pina Martins 2011-05-12 08:26:24 UTC
I have found where the offending line is added:
In the source file:
libreoffice-build-3.3.2.2.tar.gz (I cannot find this file for the latest beta in http://download.documentfoundation.org/libreoffice/src/), under:

'libreoffice-build-3.3.2.2/patches/dev300/pyuno-ooodir.diff'

This patch will introduce the line that causes issues.
Do you think it is something that should be fixed in the source, or just something that Arch has to deal with?
It seems like during the build of libreoffice, the ${exec_prefix} variable doesn't get translated into "/usr" for some reason.
I should also mention that during the package building, Arch passes the following to ./configure:
--prefix=/usr --exec-prefix=/usr --sysconfdir=/etc \
Comment 3 Francisco Pina Martins 2011-06-05 07:59:57 UTC
Seems like this can be closed. It's fixed in 3.4.0.
Comment 4 Francisco Pina Martins 2011-07-05 09:39:06 UTC
Since nobody did it, I took the liberty of closing the bug myself.
It's been fixed in 3.4.0 and didn't regress in 3.4.1.
Comment 5 Björn Michaelsen 2011-12-22 05:54:04 UTC
RESOLVED, FIXED or CLOSED bugs cant be KEYWORD NEEDINFO.
Comment 6 Francisco Pina Martins 2011-12-22 06:53:08 UTC
Sorry about that. I'm still new to this sort of thing.