After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 152448 - intltool doesn't expand shell escapes in GETTEXT_PACKAGE
intltool doesn't expand shell escapes in GETTEXT_PACKAGE
Status: RESOLVED FIXED
Product: intltool
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: intltool maintainers
intltool maintainers
Depends on:
Blocks:
 
 
Reported: 2004-09-12 18:10 UTC by Danilo Segan
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use shell-escaping for module name everywhere (1.00 KB, patch)
2004-09-12 18:18 UTC, Danilo Segan
none Details | Review
Expand shell escapes in all variables (1.21 KB, patch)
2004-09-24 16:25 UTC, Danilo Segan
none Details | Review
Expand shell escapes (now with comment) (1.35 KB, patch)
2004-09-24 16:28 UTC, Danilo Segan
committed Details | Review

Description Danilo Segan 2004-09-12 18:10:45 UTC
Discussion starts at
http://lists.gnome.org/archives/gnome-i18n/2004-August/msg00289.html

Rodney gives the reasoning here:
http://lists.gnome.org/archives/gnome-i18n/2004-August/msg00292.html

I'll attach a patch which fixes this in the following way:
1. turns file-existency test into "test -f" backticks-command, so module name
would get expanded there as well
2. turns system("msgmerge ...") call into "print `msgmerge ...`" (to make use of
shell-expansion as well)
Comment 1 Danilo Segan 2004-09-12 18:18:23 UTC
Created attachment 31514 [details] [review]
Use shell-escaping for module name everywhere

(patch is against intltool-update; it should, of course, be commited against
intltool-update.in)

2004-09-12  Danilo Šegan  <dsegan@gmx.net>

	* intltool-update.in (GeneratePOTemplate): die() when cannot open
	file for writing.
	(POFile_Update): Test for file using `test -f`; use `msgmerge`
	instead of system() call.
Comment 2 Kenneth Rohde Christiansen 2004-09-13 11:59:47 UTC
Looks good. Don't know if we should add a comment or not.
Comment 3 Danilo Segan 2004-09-13 20:12:20 UTC
It sounds as a good idea to add a comment. 

Rodney was talking about giving this issue another look, so perhaps he'll come
up with entirely different solution.
Comment 4 Rodney Dawes 2004-09-24 15:28:02 UTC
I would like to fix it for all variables, since we parse them all, and any one
may be referenced by another that we actually use. But given the majority of
cases, this patch looks ok.

Danilo, can you please comment the code and commit the patch? Thanks.
Comment 5 Danilo Segan 2004-09-24 16:25:39 UTC
Created attachment 31909 [details] [review]
Expand shell escapes in all variables

Rodney, how about this one? (it uses the same idea on all variables, and the
change is even simpler: two other changes are unrelated simple bugfixes)

2004-09-24  Danilo Šegan  <dsegan@gmx.net>

	* intltool-update.in.in (GeneratePOTemplate): Bork out if we
	cannot write POTFILES.in.temp.

	* intltool-update.in.in (SubstituteVariable): Fix typo in re: s/$1)/$1/

	(variables with quotes got ")" attached previously); use shell
	escaping (`echo -n "$str"`).
Comment 6 Danilo Segan 2004-09-24 16:28:33 UTC
Created attachment 31911 [details] [review]
Expand shell escapes (now with comment)

Same patch with comment about why we do it this way
Comment 7 Rodney Dawes 2004-09-24 16:52:51 UTC
Please commit and add an entry to NEWS above the one I just added for another bug.
Comment 8 Danilo Segan 2004-09-24 17:11:51 UTC
Ok, committed to HEAD along with NEWS entry for this bug (other fixes are not
documented in NEWS, since I don't think we should replicate entire ChangeLog in
there).

Marking as RESOLVED/FIXED as well.