Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 255479 - gnome-extra/gnome-user-docs-2.24.2 and app-text/gnome-doc-utils-0.14.2 can break with LINGUAS=de
Summary: gnome-extra/gnome-user-docs-2.24.2 and app-text/gnome-doc-utils-0.14.2 can br...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Linux Gnome Desktop Team
Depends on:
Blocks: 260063
  Show dependency tree
Reported: 2009-01-19 09:16 UTC by Martin von Gagern
Modified: 2009-02-28 12:57 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

emerge --info (emerge--info,5.18 KB, text/plain)
2009-01-19 09:17 UTC, Martin von Gagern
emerge --info (emerge --info,3.64 KB, text/plain)
2009-02-03 07:30 UTC, Henrik Schöpel
build.log (build.log,33.63 KB, text/plain)
2009-02-03 07:45 UTC, Henrik Schöpel
Avoid (bug255479a.patch,1.31 KB, patch)
2009-02-03 09:47 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2009-01-19 09:16:54 UTC
I got the error message quoted below when updating my @world, including app-text/gnome-doc-utils-0.14.2 and gnome-extra/gnome-user-docs-2.24.2.

However, when I later remerged gnome-extra/gnome-user-docs-2.24.2, I could not reproduce the issue. As the update had emerged gnome-doc-utils before it tried gnome-user-docs, the version of xml2po used should be the same in both cases, so I'm a bit surprised about one of them failing where the other one works. The gnome-user-docs hasn't been changed in CVS either.

So the workaround seems to be: try again.

Traceback (most recent call last):
  File "/usr/bin/xml2po", line 856, in <module>
  File "/usr/bin/xml2po", line 589, in doSerialize
    outtxt += doSerialize(child)
  File "/usr/bin/xml2po", line 583, in doSerialize
    (starttag, content, endtag, translation) = processElementTag(node, repl, 1)
  File "/usr/bin/xml2po", line 500, in processElementTag
    (starttag, content, endtag, translation) = processElementTag(child, myrepl, 0)
  File "/usr/bin/xml2po", line 496, in processElementTag
    myrepl.append(processElementTag(child, myrepl, 1))
  File "/usr/bin/xml2po", line 496, in processElementTag
    myrepl.append(processElementTag(child, myrepl, 1))
  File "/usr/bin/xml2po", line 529, in processElementTag
    replaceNodeContentsWithText(node, translation)
  File "/usr/bin/xml2po", line 375, in replaceNodeContentsWithText
    tmp = tmp + content.encode('utf-8')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 115: ordinal not in range(128)
make[1]: *** [de/gosbasic.xml] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/gnome-extra/gnome-user-docs-2.24.2/work/gnome-user-docs-2.24.2/gnome2-user-guide'
make: *** [all-recursive] Error 1
Comment 1 Martin von Gagern 2009-01-19 09:17:26 UTC
Created attachment 178973 [details]
emerge --info
Comment 2 Gilles Dartiguelongue gentoo-dev 2009-01-19 20:45:20 UTC
I had the same problem once exactly too. Impossible to reproduce this far so if you can reproduce it somehow we'd be happy to know.
Comment 3 Henrik Schöpel 2009-02-03 07:30:22 UTC
Created attachment 180775 [details]
emerge --info
Comment 4 Henrik Schöpel 2009-02-03 07:30:31 UTC

I have the same problem and can`t compile the package. 

Emerge --info attached
Comment 5 Henrik Schöpel 2009-02-03 07:45:20 UTC
Created attachment 180776 [details]
Comment 6 Martin von Gagern 2009-02-03 09:47:32 UTC
Created attachment 180786 [details, diff]

This is a parallel build issue. The key is directly in front of the backtrace: "Can't open MO file ''"

Looking at "xml2po --help" you will see:
    -p    --po-file=FILE       Specify PO file containing translation, and merge
                                 Overwrites temporary file

This -p option is used by the build process. Looking at the source of xml2po:
    elif opt in ('-t', '--translation'):
        mofile = arg
        mode = 'merge'
        if translationlanguage == '':
            translationlanguage = os.path.split(os.path.splitext(mofile)[0])[1]
    elif opt in ('-p', '--po-file'):
        mofile = ""
        pofile = arg
        if translationlanguage == '':
            translationlanguage = os.path.split(os.path.splitext(pofile)[0])[1]
        os.system("msgfmt -o %s %s >%s" % (mofile, pofile, NULL_STRING)) \
            and sys.exit(7)
        mode = 'merge'

So you see that the -p option will always use the same temporary file, in the current working directory.

The easiest workaround for users is this:
  MAKEOPTS=-j1 emerge -1 gnome-user-docs

A similar workaround could be used in the ebuild as well, to solve the issue for now.

A proper solution would be to move the msgfmt invocation from xml2po to the Makefile and use -t instead of -p. This way, a unique file is used every time.

The attached patch seems to get the job done, if applied directly after the gnome-user-docs-2.24.2-parallel-make.patch from bug 252163. It might even be integrated into that patch.

As the use of the temporary in parallel builds might have caused errors undetected by make, I guess the fix should be included in a revbump, to ensure proper builds for all users.
Comment 7 Martin von Gagern 2009-02-03 11:04:10 UTC
Reported upstream:
Comment 8 Rémi Cardona gentoo-dev 2009-02-03 12:35:22 UTC
Please attach the patch to the upstream bug, it'll make their lives a bit easier.

Comment 9 Henrik Schöpel 2009-02-03 13:09:16 UTC

MAKEOPTS=-j1 emerge -1 gnome-user-docs

works just fine here !

Thanks a million for the hint.

Comment 10 Martin von Gagern 2009-02-20 17:54:04 UTC
Just because it's reported upstream doesn't mean we'll have to wait for upstream to address this. Especially since parallel build issues are of little importance to most package maintainers but rather crucial for Gentoo. Also because even when upstream fixes this, I guess it might take a bit for the change to trickle from gnome-doc-utils down to gnome-user-docs. Please apply the patch in portage.
Comment 11 Gilles Dartiguelongue gentoo-dev 2009-02-20 18:17:17 UTC
Please don't touch keywords without dev consent, thanks.

We (gnome herd) are currently busy with other stuff and we will get to this patch as time permits. Please be patient and/or apply for recruitement.

Given the nice analysis that comes with the patch, no doubt it will get included whenever someone has the time to look into it.
Comment 12 Gilles Dartiguelongue gentoo-dev 2009-02-28 12:57:28 UTC
commited in 2.24.2-r1. Thanks for the patch and the clear explanation. It seems g-d-u is not parallel make safe at all anyway but that will be an issue to look at in another bug.