Skip Menu |
 

This queue is for tickets about the Glib CPAN distribution.

Report information
The Basics
Id: 45685
Status: resolved
Priority: 0/
Queue: Glib

People
Owner: Nobody in particular
Requestors: punya [...] cs.washington.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Attachments


Subject: Glib::MakeHelper::postamble_docs_full fails to escape / in copyright
Date: Mon, 4 May 2009 01:17:04 -0700
To: bug-Glib [...] rt.cpan.org
From: Punyashloka Biswal <punya [...] cs.washington.edu>
Download (untitled) / with headers
text/plain 797b
Distribution: Glib-1.221 Perl: 5.10.0 Platform: Linux ubuntu 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux Between Glib-1.220 and Glib-1.221, Glib::MakeHelper::postamble_docs_full switched from braces to forward slashes to quote the copyright string in the command it generates for inclusion in the Makefile. Unfortunately, it doesn't escape forward slashes inside the copyright string, which has the unfortunate consequence that the string literal terminates prematurely. Then perl tries to interpret the remaining text after the forward slash, and fails with an error. I noticed this bug while dealing with the GNU-style copyright for Clutter, which uses the expression "and/or." I imagine lots of similar copyright messages exist in other distributions. Punya
RT-Send-CC: 11285613 [...] nwu.ac.za
Download (untitled) / with headers
text/plain 994b
On Mon May 04 04:17:34 2009, punya@cs.washington.edu wrote: Show quoted text
> Between Glib-1.220 and Glib-1.221, > Glib::MakeHelper::postamble_docs_full switched from braces to forward > slashes to quote the copyright string in the command it generates for > inclusion in the Makefile. Unfortunately, it doesn't escape forward > slashes inside the copyright string, which has the unfortunate > consequence that the string literal terminates prematurely. Then perl > tries to interpret the remaining text after the forward slash, and > fails with an error. > > I noticed this bug while dealing with the GNU-style copyright for > Clutter, which uses the expression "and/or." I imagine lots of similar > copyright messages exist in other distributions.
Ah, yeah. I introduced this bug while trying to fix a related issue with dmake: <http://bugzilla.gnome.org/show_bug.cgi?id=573099>. Does the attached patch fix the problem? Martin, can you try this patch on MSWin32 with dmake and, if possible, with nmake?
diff --git a/MakeHelper.pm b/MakeHelper.pm index 015fcb2..568ef93 100644 --- a/MakeHelper.pm +++ b/MakeHelper.pm @@ -362,6 +362,7 @@ sub postamble_docs_full { if ($copyright) { # this text has to be escaped for both make and the shell. $copyright =~ s/\n/\\n/gm; # collapse to one line. + $copyright =~ s|/|\\/|g; # escape slashes for qq// $copyright = "Glib::GenPod::set_copyright(qq/$copyright/);"; }
Subject: Re: [rt.cpan.org #45685] Glib::MakeHelper::postamble_docs_full fails to escape / in copyright
Date: Thu, 18 Jun 2009 16:08:22 +0200
To: <bug-Glib [...] rt.cpan.org>
From: "Martin Schlemmer" <Martin.Schlemmer [...] nwu.ac.za>
Download (untitled) / with headers
text/plain 1.5k
Show quoted text
>>> On 6/6/2009 at 8:27 PM, "Torsten Schoenfeld via RT" <bug-Glib@rt.cpan.org>
wrote: <> URL: https://rt.cpan.org/Ticket/Display.html?id=45685 > Show quoted text
> > On Mon May 04 04:17:34 2009, punya@cs.washington.edu wrote:
>> Between Glib-1.220 and Glib-1.221, >> Glib::MakeHelper::postamble_docs_full switched from braces to forward >> slashes to quote the copyright string in the command it generates for >> inclusion in the Makefile. Unfortunately, it doesn't escape forward >> slashes inside the copyright string, which has the unfortunate >> consequence that the string literal terminates prematurely. Then perl >> tries to interpret the remaining text after the forward slash, and >> fails with an error. >> >> I noticed this bug while dealing with the GNU-style copyright for >> Clutter, which uses the expression "and/or." I imagine lots of similar >> copyright messages exist in other distributions.
> > Ah, yeah. I introduced this bug while trying to fix a related issue > with dmake: <http://bugzilla.gnome.org/show_bug.cgi?id=573099>. Does > the attached patch fix the problem? > > Martin, can you try this patch on MSWin32 with dmake and, if possible, > with nmake?
Sorry for taking so long. I tested the patch with dmake, and it works fine. With nmake I have yet to get things to link properly, but I manually copied the DLL and it also work fine. PS: With ExtUtils-MakeMaker-6.52 (ActivePerl 5.10.0.1005) at least it does not seem to build the documentation automatically - I have to issue an: dmake blib\lib\Glib\index.pod to get it to do the right thing. (Same with Gtk2, etc. using the doc stuff) Regards, M
Download (untitled) / with headers
text/plain 611b
On Thu Jun 18 10:09:45 2009, azarah wrote: Show quoted text
> I tested the patch with dmake, and it works fine. With nmake I have > yet to get > things to link properly, but I manually copied the DLL and it also > work fine.
Thanks for testing. I just committed the change. Show quoted text
> PS: With ExtUtils-MakeMaker-6.52 (ActivePerl 5.10.0.1005) at least it > does not seem > to build the documentation automatically - I have to issue an: > > dmake blib\lib\Glib\index.pod > > to get it to do the right thing. (Same with Gtk2, etc. using the doc > stuff)
Filed as a separate bug: <http://bugzilla.gnome.org/show_bug.cgi?id=587760>.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.