Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 470040 - 'intltool-merge -k' fails to handle absolute paths Edit
Summary: 'intltool-merge -k' fails to handle absolute paths Edit
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL: https://bugs.launchpad.net/intltool/+...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 464954
  Show dependency tree
 
Reported: 2013-05-16 03:34 UTC by Christian Faulhammer (RETIRED)
Modified: 2013-05-26 07:26 UTC (History)
1 user (show)

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


Attachments
Patch (0001-Fix-handling-absolute-paths-in-single-file-key-outpu.patch,1.76 KB, patch)
2013-05-16 03:34 UTC, Christian Faulhammer (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Faulhammer (RETIRED) gentoo-dev 2013-05-16 03:34:39 UTC
Created attachment 348440 [details, diff]
Patch

From upstream bug report (by mgorny):

"$ LC_ALL=C intltool-merge -k -u -c po/.intltool-merge-cache po data/gramps.keys.in /tmp/test/data/gramps.keys
 Found cached translation database
 Merging translations into /tmp/test/data/gramps.keys.
 Cannot open .//tmp/test/data/gramps.keys: No such file or directory

This is the command that is run by gramps setup.py in an out-of-source build, when the build-dir is passed as an absolute path.

The cause of the failure is that intltool implicitly prepends language-based subdirectory to the destination path. I have no idea about multiple file output, so I can't tell if it can be fixed there or not. But I believe the non-multiple-output mode shall be able to handle absolute paths similarly to how options other than '-k' handle it.

I believe that the issue can be fixed quite easily, through prepending $lang only if multiple-output mode is requested, instead of using './' as a dirty hack-around.

I'm attaching a patch made on top of 0.50.2, as I don't see a snapshot download link anywhere. Looking at the online viewer, the code should match on HEAD anyway."

Upstream has not reacted in any way, but maybe we can incorporate this fix into Gentoo as it will stop the upcoming app-misc/gramps update to 4.0.0.
Comment 1 Pacho Ramos gentoo-dev 2013-05-26 07:26:55 UTC
+*intltool-0.50.2-r1 (26 May 2013)
+
+  26 May 2013; Pacho Ramos <pacho@gentoo.org>
+  +files/intltool-0.50.2-absolute-paths.patch,
+  +files/intltool-0.50.2-localedir-fix.patch, +intltool-0.50.2-r1.ebuild:
+  Use plain localedir to install mo files to rather than trying to guess one
+  (#432848#c11), fix handling absolute paths in single file key output
+  (#470040).
+