diff options
author | Peter Wilmott <p@p8952.info> | 2015-08-10 19:32:42 +0000 |
---|---|---|
committer | Peter Wilmott <p@p8952.info> | 2015-08-10 19:32:42 +0000 |
commit | bdcecdea5d6eb6426fb2511ee6fee6792b42e935 (patch) | |
tree | 60440a7ba6750235d64ec6821745f8df86a91f0c | |
parent | Resolve issue with duplicate entries in the package table (diff) | |
download | ruby-tinderbox-bdcecdea5d6eb6426fb2511ee6fee6792b42e935.tar.gz ruby-tinderbox-bdcecdea5d6eb6426fb2511ee6fee6792b42e935.tar.bz2 ruby-tinderbox-bdcecdea5d6eb6426fb2511ee6fee6792b42e935.zip |
Resolve issue with truncated sha1 values
-rw-r--r-- | web/lib/packages.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/web/lib/packages.rb b/web/lib/packages.rb index 9d5f64b..7a3e8db 100644 --- a/web/lib/packages.rb +++ b/web/lib/packages.rb @@ -6,12 +6,11 @@ def update_packages(ci_image) ) ci_container.start ci_container.wait(36_000) - packages_txt = ci_container.logs(stdout: true) + packages_txt = ci_container.streaming_logs(stdout: true) ci_container.delete packages_txt = packages_txt.lines.sort.uniq packages_txt.peach do |line| - line = line.bytes.drop(8).pack('c*') next if line.empty? sha1, category, name, version, revision, slot, amd64_keyword, r19_target, r20_target, r21_target, r22_target = line.split(' ') identifier = category + '/' + name + '-' + version + (revision == 'r0' ? '' : "-#{revision}") @@ -37,7 +36,7 @@ def update_packages(ci_image) end Package.peach(8) do |package| - unless packages_txt.find { |sha1| /#{package[:sha1]}/ =~ sha1 } + unless packages_txt.find { |sha1| /^#{package[:sha1]}/ =~ sha1 } package.build.map(&:delete) package.repoman.map(&:delete) package.delete |