[Rubygems-developers] [rubygems] Build still broken (#1111)

Anatol Pomozov anatol.pomozov at gmail.com
Mon Dec 4 16:05:24 EST 2006


Hi, Eric.

Your solution works fine on Windows.

Just add comments to these lines what those returns are mean.

On 12/4/06, Eric Hodel <drbrain at segment7.net> wrote:
>
> On Dec 2, 2006, at 23:51 , Anatol Pomozov wrote:
>
> > Look at test code at test_gem_source_info_cache.rb:80 . Chmod and
> > stat functions are very limited on Windows platform.
> >
> > I have added code that shows us what permission file has after we
> > try to set 0222 mode
> >     FileUtils.chmod 0222, @sic.system_cache_file
> >     puts sprintf("%o", File.stat(@sic.system_cache_file).mode)
> >
> > It returns me
> > 100644
> >
> > It means that "real" file mode is 644. So RubyGems engine could
> > read cache data.
>
> How about this patch:
>
> Index: test/test_gem_source_info_cache.rb
> ===================================================================
> --- test/test_gem_source_info_cache.rb  (revision 1111)
> +++ test/test_gem_source_info_cache.rb  (working copy)
> @@ -79,6 +79,8 @@
>     def test_cache_data_none_readable
>       FileUtils.chmod 0222, @sic.system_cache_file
>       FileUtils.chmod 0222, @sic.user_cache_file
> +    return if (File.stat(@sic.system_cache_file).mode & 0222) != 0222
> +    return if (File.stat(@sic.user_cache_file).mode & 0222) != 0222
>       assert_equal({}, @sic.cache_data)
>     end
>
> --
> Eric Hodel - drbrain at segment7.net - http://blog.segment7.net
>
-- 
anatol (http://feeds.feedburner.com/apomozov-eng)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20061205/50462587/attachment.html 


More information about the Rubygems-developers mailing list