[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#867209: template path is wrong...



retitle 867209 libreoffice: Letter wizard can't find wizard templates when Wiki Publisher installed
thanks

thanks

Hi,

I did a strace now. Seeing some very much ENOENT etc. for __pycache__ which clobber the
output but are expected (no cache, no permission to write there( I stumbled upon 

6636  access("/usr/lib/libreoffice/program/../share/extensions/wiki-publisher/templates/wizard", F_OK) = -1 ENOENT (No such file or directory)
6636  access("/usr/lib/libreoffice/program/../share/extensions/wiki-publisher/templates/wizard", F_OK) = -1 ENOENT (No such file or directory)
6636  clone(child_stack=0x7efdfa91cc30, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7efdfa91d9d0, tls=0x7efdfa91d700, child_tidptr=0x7efdfa91d9d0) = 6667
6636  futex(0x560e1f5a178c, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
6667  set_robust_list(0x7efdfa91d9e0, 24) = 0
6667  futex(0x560e1f5a178c, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x560e1f5a1788, FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_GT<<24|0x1 <unfinished ...>
[...]
6636  futex(0x560e1f5a178c, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x560e1f5a1788, FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_GT<<24|0x1) = 0
6636  stat("/usr/lib/libreoffice/program/wizards/letter/LetterWizardDialogImpl.py", {st_mode=S_IFREG|0644, st_size=42582, ...}) = 0
6636  open("/usr/lib/libreoffice/program/wizards/letter/LetterWizardDialogImpl.py", O_RDONLY|O_CLOEXEC) = 52
6636  fstat(52, {st_mode=S_IFREG|0644, st_size=42582, ...}) = 0
6636  ioctl(52, TCGETS, 0x7ffe67d954c0) = -1 ENOTTY (Inappropriate ioctl for device)
6636  lseek(52, 0, SEEK_CUR)            = 0
6636  read(52, "#\n# This file is part of the Lib"..., 4096) = 4096
6636  lseek(52, 0, SEEK_CUR)            = 4096
6636  read(52, "lf.myConfig.cp_PrivateOfficialLe"..., 8192) = 8192
6636  read(52, "(self):\n        self.xDialogMode"..., 8192) = 8192
6636  read(52, "rCompanyAddress.State != 0:\n    "..., 8192) = 8192
6636  read(52, "            self.xDialogModel.tx"..., 8192) = 8192
6636  read(52, "            UnoDataAware.attachL"..., 8192) = 5718
6636  read(52, "", 8192)                = 0
6636  close(52)                         = 0
6636  stat("/usr/lib/libreoffice/program/wizards/ui/WizardDialog.py", {st_mode=S_IFREG|0644, st_size=18866, ...}) = 0
6636  open("/usr/lib/libreoffice/program/wizards/ui/WizardDialog.py", O_RDONLY|O_CLOEXEC) = 52
6636  fstat(52, {st_mode=S_IFREG|0644, st_size=18866, ...}) = 0
6636  ioctl(52, TCGETS, 0x7ffe67d954c0) = -1 ENOTTY (Inappropriate ioctl for device)
6636  lseek(52, 0, SEEK_CUR)            = 0
6636  read(52, "#\n# This file is part of the Lib"..., 4096) = 4096
6636  lseek(52, 0, SEEK_CUR)            = 4096
6636  read(52, " self.oRoadmap.CurrentItemID = I"..., 8192) = 8192
6636  read(52, "          (True, iButtonHeight, "..., 8192) = 6578
6636  read(52, "", 8192)                = 0
6636  close(52)                         = 0
6636  write(2, "Traceback (most recent call last"..., 35) = 35
6636  write(2, "  File \"/usr/lib/libreoffice/pro"..., 131) = 131
6636  write(2, "  File \"/usr/lib/libreoffice/pro"..., 150) = 150
6636  write(2, "Exception: could not find wizard"..., 43) = 43

Which prints the message.

Upstream didn't ship this either:

rene@frodo:~/Downloads/LibreOfficeDev_5.4.0.0.beta2_Linux_x86-64_deb/DEBS$ dpkg --contents lodevbasis5.4-extension-mediawiki-publisher_5.4.0.0.beta2-1_amd64.deb  | grep template
drwxr-xr-x root/root         0 2017-06-07 19:33 ./opt/libreofficedev5.4/share/extensions/wiki-publisher/templates/
drwxr-xr-x root/root         0 2017-06-07 19:33 ./opt/libreofficedev5.4/share/extensions/wiki-publisher/templates/MediaWiki/
-rw-r--r-- root/root      6304 2017-06-07 19:33 ./opt/libreofficedev5.4/share/extensions/wiki-publisher/templates/MediaWiki/mediawiki.ott
rene@frodo:~/Downloads/LibreOfficeDev_5.4.0.0.beta2_Linux_x86-64_deb/DEBS$

When I mkdir said path it breaks even more horribly:

Traceback (most recent call last):
  File "/usr/lib/libreoffice/program/wizards/common/FileAccess.py", line 156, in getFolderTitles
    nameList = xInterface.getFolderContents(FolderName, False)
wizards.common.FileAccess.com.sun.star.ucb.InteractiveAugmentedIOException: an error occurred during opening a directory
Traceback (most recent call last):
  File "/usr/lib/libreoffice/program/wizards/common/FileAccess.py", line 156, in getFolderTitles
    nameList = xInterface.getFolderContents(FolderName, False)
wizards.common.FileAccess.com.sun.star.ucb.InteractiveAugmentedIOException: an error occurred during opening a directory
Traceback (most recent call last):
  File "/usr/lib/libreoffice/program/wizards/common/FileAccess.py", line 156, in getFolderTitles
    nameList = xInterface.getFolderContents(FolderName, False)
wizards.common.FileAccess.com.sun.star.ucb.InteractiveAugmentedIOException: an error occurred during opening a directory
Traceback (most recent call last):
  File "/usr/lib/libreoffice/program/wizards/letter/LetterWizardDialogImpl.py", line 96, in startWizard
    self.initializeTemplates(xMSF)
  File "/usr/lib/libreoffice/program/wizards/letter/LetterWizardDialogImpl.py", line 766, in initializeTemplates
    tuple(self.BusinessFiles[0])
IndexError: list index out of range

After removing said dir again *AND* removing libreoffice-wiki-publisher the
wizard starts for me... (Interestingly in a upstream installation it works
even with lodevbasis5.4-extension-mediawiki-publisher installed)...

Quick chat with upstream:

20:29 < mst_> _rene_: "/usr/lib/libreoffice/program/../share/extensions/wiki-publisher/templates/wizard" ? interesting ... it's 
              possible that there is some list-of-paths setting for Templates and the wiki-publisher adds an entry there and the wizard 
              only looks at the first path, not all of them
20:30 < _rene_> yes, but a) that doesn't happen in upstreams deb (dpkg -i *.deb so with wiki-publisher)
20:30 < _rene_> and b) mkdir'ing that dir makes it worse
20:32 < _rene_> but yeah, it does. for that templates/MediaWiki/mediawiki.ott
20:34 < _rene_> ah, sigh. have an idea

That pushed me into the right direction, there is

root@sid:/usr/lib/libreoffice/share/extensions/wiki-publisher# grep -ri template * | grep \.xc
filter/math/entities.xsl:               <xsl:when test="starts-with($content,'&#x000A1;')"><xsl:value-of select="'\textexclamdown '" /><xsl:call-template name="replaceEntities"><xsl:with-param name="content" select="substring-after($content, '&#x000A1;')"/></xsl:call-template></xsl:when>
filter/math/tokens.xsl:         <xsl:message>Exception at color template</xsl:message>
filter/math/tokens.xsl:                 <xsl:message>Exception at Hex2Decimal template</xsl:message>
Paths.xcu:        <node oor:name="Template" oor:op="fuse">
Paths.xcu:                <node oor:name="%origin%/templates" oor:op="fuse"/>
WikiExtension.xcs:    <templates>
WikiExtension.xcs:    </templates>

20:34 < _rene_> shrugs. that was it.
20:36 < _rene_> old patch cargo-culted over breaking it
20:36 < _rene_> (that patch fixed a bug once, though)
20:36 < _rene_> https://anonscm.debian.org/cgit/pkg-openoffice/libreoffice.git/tree/patches/mediwiki-oor-replace.diff?h=debian-experimental-5.4
20:36 < _rene_> for the Template, back replace -> fuse. works.

(in Paths.xcu)

So you could fix Paths.xcu until the next upload where it will be included...

Regards,

Rene


Reply to: