[Bug 719854] Review Request: rubygem-xmlparser-0.6.81-1 - Ruby bindings to the Expat XML parsing library

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

 



Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=719854

--- Comment #32 from Vít Ondruch <vondruch@xxxxxxxxxx> 2011-12-07 09:33:48 EST ---
(In reply to comment #31)
> I've tried to follow the rule for moving the .so files. If I do so, i.e. if I
> move the library to %{ruby_sitearch}/lib/, the package no longer works, at
> least not on my test machine. Adding a link solved this problem. 

You should first understand how Ruby together with RubyGems are treating load
paths. I'll try to shortly explain:
1) If you do "require 'foo'", Ruby searches all the load paths and if finds the
file on some of them, it loads it. Ruby has some set of default load paths and
%{buildroot}%{ruby_sitearch} is one of them. I.e. if you place file foo.rb (or
foo.so) into that path, then you can do later "require 'foo'".
2) If the file is not found in load paths, then the RubyGems loading mechanism
kicks in. RubyGems goes through all installed gems and looks for suitable file
to load. When it is found, RubyGems will insert its paths (which are specified
by #require_paths method in .gemspec file) into Ruby's load paths and issues
again regular Ruby's require.

So if you place the library into the %{buildroot}%{ruby_sitearch}/xmlparser.so
location, then there is no need to do any link, since Ruby can find the file on
its load path. And that is the way how it should be done currently.


And I have some additional notes:
* It seems that the author of the gem is somebody else then the original
upstream. However, it would be nice if the link to homepage was somehow useful,
may be http://www.yoshidam.net/Ruby.html#xmlparser is the correct one?
* It might make sense to ask the author of the gem for update to the latest
upstream version of the library?

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review



[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]