diff options
author | Slack Coder <slackcoder@server.ky> | 2019-03-04 13:52:09 +0100 |
---|---|---|
committer | Slack Coder <slackcoder@server.ky> | 2019-03-04 13:52:09 +0100 |
commit | 98675c3de64fc54a2dc7422178249913faf11c66 (patch) | |
tree | 28af716b21b83034233a86286d8e49bf435688c0 | |
parent | 53eded5e435e4462104c2204348d3beff251c8db (diff) | |
download | slackware.com-client-98675c3de64fc54a2dc7422178249913faf11c66.tar.xz |
improve BUG report
-rwxr-xr-x | not-slackware.com | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/not-slackware.com b/not-slackware.com index 769b6fb..78cb97a 100755 --- a/not-slackware.com +++ b/not-slackware.com @@ -2,14 +2,18 @@ require "time" -# TODO: Rename command to slackware.com +# TODO: Create other commands +# TODO: List changelog entries per package # TODO: List mirrors +# TODO: List removed packages mentioned in changelog # TODO: Read input from STDIN using '-' +# TODO: Rename command to slackware.com # TODO: Silence when backgrounded like 'scp' -# TODO: List changelog entries per package -# TODO: List removed packages mentioned in changelog # BUG: File verification with Checksums appears to fail when QUIET is enabled, -# and a Changelog update occured. +# BUG: CHECKSUMS file not being correctly downloaded after update: +# This is because 'wget' does not replace downloaded signature files as +# expected, resulting in a verification error. Maybe the 'download' function +# should be changed? env_vars = {} ROOT = ENV["ROOT"] || "/" @@ -280,9 +284,7 @@ class Local end def self.download(mirror, dest, file_path) - url = File.join(mirror, file_path) command = ["wget", - "--continue", "--directory-prefix", dest, url ] @@ -304,18 +306,23 @@ class Local end file_name = File.basename(remote_file_path) + puts "downloading #{remote_file_path}" err = self.download(mirror, CACHE, remote_file_path) + puts "erorr" if err return err if err local_file_path = File.join(CACHE, file_name) if File.extname(file_name) == ".txz" || file_name == CHECKSUMS err = self.gpg_verify(local_file_path_sig) + puts "unlinking after gpg verification" if err && File.exist?(local_file_path) File.unlink(local_file_path) if err && File.exist?(local_file_path) return err if err end + puts file_name unless file_name == CHECKSUMS checksum_path = File.join(CACHE, CHECKSUMS) err = self.md5sum_verify(checksum_path, local_file_path) + puts "unlinking after md5sum verification" if err && File.exist?(local_file_path) File.unlink(local_file_path) if err && File.exist?(local_file_path) return err if err end |