<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>123962</bug_id>
          
          <creation_ts>2006-02-24 09:59 0000</creation_ts>
          <short_desc>openoffice can not execute python scripts</short_desc>
          <delta_ts>2006-03-04 11:05:42 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>2005.1</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://udk.openoffice.org/python/scriptingframework/push_me_python4.odt</bug_file_loc>
          
          
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>acgen@achome.net</reporter>
          <assigned_to>openoffice@gentoo.org</assigned_to>
          <cc>acgen@achome.net</cc>

      

      
          <long_desc isprivate="0">
            <who>acgen@achome.net</who>
            <bug_when>2006-02-24 09:59:28 0000</bug_when>
            <thetext>This is for app-office/openoffice-bin

When try to open a document with python script openoffice says
&quot;Message: The scripting language Python is not supported&quot;.

After an investigation I found that openoffice looks for python in
/usr/lib/openoffice/program/python-core
but there is no such directory there after installation.
There is only
/usr/lib/openoffice/program/python-core-2.3.4

I made a link /usr/lib/openoffice/program/python-core -&gt; python-core-2.3.4

After that if I start ooffice2 from terminal and try to execute python script I see the following:
$ oowriter2 push_me_python4.odt 
&apos;import site&apos; failed; use -v for traceback

I fixed it by adding the line
delete $ENV{&apos;PYTHONPATH&apos;};
into
/usr/bin/ooffice2

before
# And here we go.
exec &quot;$SystemInstallDir/program/soffice&quot;, @ooo_argv</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>acgen@achome.net</who>
            <bug_when>2006-02-24 10:09:29 0000</bug_when>
            <thetext>Created an attachment (id=80608)
Diff for ooffice2

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>acgen@achome.net</who>
            <bug_when>2006-02-24 10:10:13 0000</bug_when>
            <thetext>Created an attachment (id=80609)
Diff to create a python-core link 

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>acgen@achome.net</who>
            <bug_when>2006-02-24 14:04:50 0000</bug_when>
            <thetext>(From update of attachment 80609)
--- /usr/portage/app-office/openoffice-bin/openoffice-bin-2.0.2_rc2.ebuild      2006-02-21 05:35:51.000000000 -0500
+++ openoffice-bin-2.0.2_rc2.ebuild     2006-02-24 17:02:51.000000000 -0500
@@ -169,6 +169,7 @@
        done
 
        dosym ${INSTDIR}/program/spadmin.bin /usr/bin/oopadmin2
+       dosym ${INSTDIR}/program/python-core-2.3.4 ${INSTDIR}/program/python-core
 
        # Change user install dir
        sed -i -e s/.openoffice.org2/.ooo-2.0/g ${D}${INSTDIR}/program/bootstraprc || die</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>acgen@achome.net</who>
            <bug_when>2006-02-24 14:09:38 0000</bug_when>
            <thetext>Created an attachment (id=80628)
Diff for ooffice2

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>acgen@achome.net</who>
            <bug_when>2006-02-24 14:11:14 0000</bug_when>
            <thetext>Created an attachment (id=80629)
Patch to create a python-core link

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>suka@gentoo.org</who>
            <bug_when>2006-03-04 08:04:12 0000</bug_when>
            <thetext>Good catch, but I&apos;ve only added the second patch (the one for the wrapper) to our package, cause I can&apos;t reproduce the first one, it works fine for me without the symlink. Maybe this was a temporary problem in RC2, please try if rc4 works now for you</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>acgen@achome.net</who>
            <bug_when>2006-03-04 10:22:42 0000</bug_when>
            <thetext>I tested RC4 and it works right out of a box, I mean after emerge openoffice-bin.
Thanks.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>suka@gentoo.org</who>
            <bug_when>2006-03-04 11:05:42 0000</bug_when>
            <thetext>Great and thanks for catching this!</thetext>
          </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>80608</attachid>
            <date>2006-02-24 10:09 0000</date>
            <desc>Diff for ooffice2</desc>
            <filename>ooo-wrapper2.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">MTE3YTExOCwxMTkKPiBkZWxldGUgJEVOVnsnUFlUSE9OUEFUSCd9Owo+IAo=
</data>        

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>80609</attachid>
            <date>2006-02-24 10:10 0000</date>
            <desc>Diff to create a python-core link </desc>
            <filename>openoffice-bin-2.0.2_rc2.ebuild.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">MTcxYTE3Mgo+IAlkb3N5bSAke0lOU1RESVJ9L3Byb2dyYW0vcHl0aG9uLWNvcmUtMi4zLjQgJHtJ
TlNURElSfS9wcm9ncmFtL3B5dGhvbi1jb3JlCg==
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>80628</attachid>
            <date>2006-02-24 14:09 0000</date>
            <desc>Diff for ooffice2</desc>
            <filename>ooo-wrapper2.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC91c3IvcG9ydGFnZS9hcHAtb2ZmaWNlL29wZW5vZmZpY2UtYmluL2ZpbGVzLzIuMC4yX3Jj
Mi9vb28td3JhcHBlcjIJMjAwNi0wMi0yMSAwNTozNTo1MS4wMDAwMDAwMDAgLTA1MDAKKysrIG9v
by13cmFwcGVyMgkyMDA2LTAyLTI0IDE3OjAxOjU3LjAwMDAwMDAwMCAtMDUwMApAQCAtMTE1LDUg
KzExNSw3IEBACiAgICAgcHJpbnQgU1RERVJSICJcblxuIC0tLSBXYXJuaW5nIC0gT08ubyB3aWxs
IG5vdCB3b3JrIHdpdGhvdXQgYSBtb3VudGVkIC9wcm9jIGZpbGVzeXN0ZW0gLS0tIFxuXG5cbiI7
CiB9CiAKK2RlbGV0ZSAkRU5WeydQWVRIT05QQVRIJ307CisKICMgQW5kIGhlcmUgd2UgZ28uCiBl
eGVjICIkU3lzdGVtSW5zdGFsbERpci9wcm9ncmFtL3NvZmZpY2UiLCBAb29vX2FyZ3YK
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>80629</attachid>
            <date>2006-02-24 14:11 0000</date>
            <desc>Patch to create a python-core link</desc>
            <filename>openoffice-bin-2.0.2_rc2.ebuild.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC91c3IvcG9ydGFnZS9hcHAtb2ZmaWNlL29wZW5vZmZpY2UtYmluL29wZW5vZmZpY2UtYmlu
LTIuMC4yX3JjMi5lYnVpbGQJMjAwNi0wMi0yMSAwNTozNTo1MS4wMDAwMDAwMDAgLTA1MDAKKysr
IG9wZW5vZmZpY2UtYmluLTIuMC4yX3JjMi5lYnVpbGQJMjAwNi0wMi0yNCAxNzowMjo1MS4wMDAw
MDAwMDAgLTA1MDAKQEAgLTE2OSw2ICsxNjksNyBAQAogCWRvbmUKIAogCWRvc3ltICR7SU5TVERJ
Un0vcHJvZ3JhbS9zcGFkbWluLmJpbiAvdXNyL2Jpbi9vb3BhZG1pbjIKKwlkb3N5bSAke0lOU1RE
SVJ9L3Byb2dyYW0vcHl0aG9uLWNvcmUtMi4zLjQgJHtJTlNURElSfS9wcm9ncmFtL3B5dGhvbi1j
b3JlCiAKIAkjIENoYW5nZSB1c2VyIGluc3RhbGwgZGlyCiAJc2VkIC1pIC1lIHMvLm9wZW5vZmZp
Y2Uub3JnMi8ub29vLTIuMC9nICR7RH0ke0lOU1RESVJ9L3Byb2dyYW0vYm9vdHN0cmFwcmMgfHwg
ZGllCg==
</data>        

          </attachment>
    </bug>

</bugzilla>