Bug 40168 - libreoffice-3.4.2.3: pyuno broken
Summary: libreoffice-3.4.2.3: pyuno broken
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.4.2 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-17 06:38 UTC by Egor Y. Egorov
Modified: 2012-08-31 10:04 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Y. Egorov 2011-08-17 06:38:25 UTC
I'm using Gentoo.

After upgrade pyuno broken in app-office/libreoffice-3.4.2.3. In 3.3.3 all right.

Reproducible: Always

Steps to Reproduce:
1. USE="odk java" emerge =libreoffice-3.4.2.3
2. create new file:
$ cat test.py
#!/usr/bin/env python                                                           
# -*- coding: utf-8 -*-                                                         
import sys                                                                      
sys.path.append('/usr/lib/libreoffice/basis-link/program')
import os
import uno

#a UNO struct later needed to create a document
from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK
from com.sun.star.text.TextContentAnchorType import AS_CHARACTER
3. execute script:
$ python test.py
Actual Results:  
executing with errors:
Traceback (most recent call last):
  File "test.py", line 9, in <module>
    from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK
  File "/usr/lib/libreoffice/basis-link/program/uno.py", line 291, in
_uno_import
    raise ImportError( "type "+ name + "." +x + " is unknown" )
ImportError: type com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK is unknown

Expected Results:  
executing without errors

This patch solves the problem:

--- /usr/lib/libreoffice/basis-link/program/uno.py_orig 2011-08-09
00:26:36.000000000 +0700                                                  
+++ /usr/lib/libreoffice/basis-link/program/uno.py      2011-08-15
10:41:26.000000000 +0700                                                  
@@ -25,7 +25,11 @@                                                              
 #
 #*************************************************************************
 import sys
+import os

+sys.path.append('/usr/lib/libreoffice/basis-link/program')
+if getattr(os.environ, 'URE_BOOTSTRAP', None) is None:
+    os.environ['URE_BOOTSTRAP'] =
"vnd.sun.star.pathname:/usr/lib/libreoffice/program/fundamentalrc"
 import pyuno
 import __builtin__
 import socket # since on Windows sal3.dll no longer calls WSAStartup

In libreoffice-3.3.3 uno.py contain these lines.

I created a bug on Gentoo bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=379227
but I was told to report here.

Thanks.
Comment 1 Rene Engelhard 2011-08-17 14:52:05 UTC
You always needed that patch , and that patch is still available and applied if you use the build repos (http://cgit.freedesktop.org/libreoffice/build/tree/patches/dev300/pyuno-ooodir.diff.in?h=libreoffice-3-4). This was also
the case in 3.3.3.

So Gentoo dropped patches without knowing what dropping them breaks...

Wrt your patch: theoretically OK, but practically, how do you know everyone has their OOo install in /usr/lib/libreoffice? Right, you don't...

But yes, *somehow* this should work out of the box...
Comment 3 Egor Y. Egorov 2011-08-17 19:13:51 UTC
(In reply to comment #1)
> Wrt your patch: theoretically OK, but practically, how do you know everyone has
> their OOo install in /usr/lib/libreoffice? Right, you don't...

You are certainly right. I posted this patch with no claims to objectivity. Only to demonstrate the problem in my case.

I put a link to your response to https://bugs.gentoo.org/show_bug.cgi?id=379227#c3

Thanks.
Comment 4 Björn Michaelsen 2011-12-23 12:37:10 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 5 Egor Y. Egorov 2011-12-25 02:32:44 UTC
At the moment it is impossible to install the new version (see #395049), so I can not confirm or deny the existence of the bug in 3.4.99.2
Comment 6 Egor Y. Egorov 2012-02-08 20:01:06 UTC
On 3.4.5.2 and 3.5.0-r2 bug is not reproduced. 
In my opinion, the bug can be closed.
Comment 7 Florian Reisinger 2012-08-14 13:59:11 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 8 Florian Reisinger 2012-08-14 14:00:23 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 9 Florian Reisinger 2012-08-14 14:05:05 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 10 Florian Reisinger 2012-08-14 14:07:08 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian