logo       

Re: [rubygems] Build still broken (#1111): msg#00016

lang.ruby.gems.devel

Subject: Re: [rubygems] Build still broken (#1111)

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-48TerJ1FxhPk1uMJSBkQmQ@xxxxxxxxxxxxxxxx> 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-48TerJ1FxhPk1uMJSBkQmQ@xxxxxxxxxxxxxxxx - http://blog.segment7.net
--
anatol ( http://feeds.feedburner.com/apomozov-eng) _______________________________________________
Rubygems-developers mailing list
Rubygems-developers-GrnCvJ7WPxnNLxjTenLetw@xxxxxxxxxxxxxxxx
http://rubyforge.org/mailman/listinfo/rubygems-developers
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise