mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert r42938 "* lib/rubygems: Update to RubyGems 2.1.3"
It breaks build.
20130913
T200302Z.diff.html.gz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2614d9ba2f
commit
269503b544
110 changed files with 4928 additions and 3479 deletions
|
@ -71,7 +71,7 @@ class Gem::Package::TarTestCase < Gem::TestCase
|
|||
SP(Z(to_oct(sum, 6)))
|
||||
end
|
||||
|
||||
def header(type, fname, dname, length, mode, checksum = nil)
|
||||
def header(type, fname, dname, length, mode, mtime, checksum = nil)
|
||||
checksum ||= " " * 8
|
||||
|
||||
arr = [ # struct tarfile_entry_posix
|
||||
|
@ -80,7 +80,7 @@ class Gem::Package::TarTestCase < Gem::TestCase
|
|||
Z(to_oct(0, 7)), # char uid[8]; ditto
|
||||
Z(to_oct(0, 7)), # char gid[8]; ditto
|
||||
Z(to_oct(length, 11)), # char size[12]; 0 padded, octal, null
|
||||
Z(to_oct(0, 11)), # char mtime[12]; 0 padded, octal, null
|
||||
Z(to_oct(mtime, 11)), # char mtime[12]; 0 padded, octal, null
|
||||
checksum, # char checksum[8]; 0 padded, octal, null, space
|
||||
type, # char typeflag[1]; file: "0" dir: "5"
|
||||
"\0" * 100, # char linkname[100]; ASCII + (Z unless filled)
|
||||
|
@ -105,16 +105,16 @@ class Gem::Package::TarTestCase < Gem::TestCase
|
|||
ret
|
||||
end
|
||||
|
||||
def tar_dir_header(name, prefix, mode)
|
||||
h = header("5", name, prefix, 0, mode)
|
||||
def tar_dir_header(name, prefix, mode, mtime)
|
||||
h = header("5", name, prefix, 0, mode, mtime)
|
||||
checksum = calc_checksum(h)
|
||||
header("5", name, prefix, 0, mode, checksum)
|
||||
header("5", name, prefix, 0, mode, mtime, checksum)
|
||||
end
|
||||
|
||||
def tar_file_header(fname, dname, mode, length)
|
||||
h = header("0", fname, dname, length, mode)
|
||||
def tar_file_header(fname, dname, mode, length, mtime)
|
||||
h = header("0", fname, dname, length, mode, mtime)
|
||||
checksum = calc_checksum(h)
|
||||
header("0", fname, dname, length, mode, checksum)
|
||||
header("0", fname, dname, length, mode, mtime, checksum)
|
||||
end
|
||||
|
||||
def to_oct(n, pad_size)
|
||||
|
@ -130,7 +130,7 @@ class Gem::Package::TarTestCase < Gem::TestCase
|
|||
end
|
||||
|
||||
def util_dir_entry
|
||||
util_entry tar_dir_header("foo", "bar", 0)
|
||||
util_entry tar_dir_header("foo", "bar", 0, Time.now)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue