Re: rubygem macro error

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

 



On Thu, Nov 10, 2011 at 11:26:11AM +0100, Vít Ondruch wrote:
> Dne 9.11.2011 17:02, Paul Wouters napsal(a):
> > On Wed, 9 Nov 2011, Alex Dalitz wrote:
> >> The %3d characters in the filenames are because the Ruby setter methods are named "<variable_name>=" - this is a common pattern across all Ruby code. The filenames are generated by the rdoc tool - nothing to do with dnsruby or its packaging. This leads me to believe that all Ruby gems packaged as rpms would have this same problem - and yet this is surely not the case?
> > right, though checking on mine, there is actually one other one:
> >
> > $ find /usr/lib/ruby/gems/1.8/doc/ |grep 3d |grep -v Dnsruby
> > /usr/lib/ruby/gems/1.8/doc/pg-0.11.0/ri/PGconn/internal_encoding%3d-i.yaml
> >
> >> As a workaround, I suppose it's worth mentioning that the doc folder could simply be removed from the gem installation. That would then give an rpm with the Ruby code, but without access to the ri documentation system. Does this also contravene rpm guidelines?
> > I talked about that, and was told they preferred the broken filenames
> > over not having anything. Which is why it ended up packaged with these
> > mistakes in fedora.
> >
> > Paul
> 
> Broken names? Please see percent encoding aka URL encoding [1]. You'll 
> see that the '%3d' is actually '=', i.e. the file 
> packet_timeout%3d-i.yaml obviously contains documentation for 
> packet_timeout= method. You'll find a lot of such encoded characters in 
> Ruby documentation and that is correct. That's how it works. It is not 
> error, just warning.
> 
> Vit
> 
> 
> [1] http://en.wikipedia.org/wiki/Percent_encoding

Yes, but the purpose of URL encoding is to reach resources that are
named using reserved characters.  So, for the filename you showed above,
the correct URL would be:
file:///usr/lib/ruby/gems/1.8/doc/pg-0.11.0/ri/PGconn/internal_encoding%253d-i.yaml
                                                                       ^^^^^

This is because the % character is reserved.  Had the file name been
"internal_encoding=.yaml", the URL would have been:
file:///usr/lib/ruby/gems/1.8/doc/pg-0.11.0/ri/PGconn/internal_encoding%3d-i.yaml
                                                                       ^^^

Hence "broken".

-- 
Scott Schmit

<<attachment: smime.p7s>>

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux