repomate 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/repomate/package.rb +3 -3
- metadata +1 -1
data/lib/repomate/package.rb
CHANGED
@@ -38,7 +38,7 @@ module RepoMate
|
|
38
38
|
sql = "create table if not exists checksums (
|
39
39
|
date varchar(25),
|
40
40
|
basename varchar(70),
|
41
|
-
|
41
|
+
suitename varchar(20),
|
42
42
|
mtime varchar(25),
|
43
43
|
md5 varchar(32),
|
44
44
|
sha1 varchar(40),
|
@@ -51,7 +51,7 @@ module RepoMate
|
|
51
51
|
def load_checksums
|
52
52
|
result = []
|
53
53
|
|
54
|
-
@pkgdb.query("select md5, sha1, sha256 from checksums where basename = '#{@basename}' and mtime = '#{@mtime.iso8601}' and
|
54
|
+
@pkgdb.query("select md5, sha1, sha256 from checksums where basename = '#{@basename}' and mtime = '#{@mtime.iso8601}' and suitename = '#{@suitename}'").each do |row|
|
55
55
|
result = row
|
56
56
|
end
|
57
57
|
result
|
@@ -64,7 +64,7 @@ module RepoMate
|
|
64
64
|
md5 = Digest::MD5.file(@fullname).to_s
|
65
65
|
sha1 = Digest::SHA1.file(@fullname).to_s
|
66
66
|
sha256 = Digest::SHA2.new(256).file(@fullname).to_s
|
67
|
-
@pkgdb.query("insert into checksums values ( '#{now}', '#{@basename}', '#{@
|
67
|
+
@pkgdb.query("insert into checksums values ( '#{now}', '#{@basename}', '#{@suitename}', '#{@mtime.iso8601}', '#{md5}', '#{sha1}', '#{sha256}' )")
|
68
68
|
end
|
69
69
|
|
70
70
|
# Gets checksums for the given package
|