[Pkg-wmaker-commits] [wmbiff] 03/17: fix some ruby1.8 warnings, minor cleanup
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Thu Aug 20 03:04:19 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to tag wmbiff_0_4_18
in repository wmbiff.
commit ee683488544e534058b821f2b896bbab151f5e3a
Author: bluehal <bluehal>
Date: Sun Oct 26 07:31:54 2003 +0000
fix some ruby1.8 warnings, minor cleanup
---
scripts/security.debian.rb | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/scripts/security.debian.rb b/scripts/security.debian.rb
index 913358d..8be8f29 100755
--- a/scripts/security.debian.rb
+++ b/scripts/security.debian.rb
@@ -1,4 +1,4 @@
-#! /usr/bin/ruby -w
+#! /usr/bin/ruby
# Copyright 2002 Neil Spring <nspring at cs.washington.edu>
# GPL
@@ -41,7 +41,7 @@ class Array
end
def debugmsg(str)
- # $stderr.puts str
+ $stderr.puts str if($VERBOSE)
end
# to be reimplemented without execing touch.
@@ -55,11 +55,7 @@ end
def version_a_gt_b(a, b)
cmd = "/usr/bin/dpkg --compare-versions %s le %s" % [ a, b ]
# $stderr.puts cmd
- if(!Kernel.system(cmd)) then
- return true
- else
- return false
- end
+ return (!Kernel.system(cmd))
end
# figure out which lists to check
@@ -71,10 +67,10 @@ end
# file, the url, the system's cache of the file, and a
# per-user cache of the file.
packagelists = Dir.glob("/var/lib/apt/lists/#{Server}*Packages").map { |pkgfile|
- [ pkgfile.gsub(".*#{Server}", '').tr('_','/'), # the url path
+ [ pkgfile.gsub(/.*#{Server}/, '').tr('_','/'), # the url path
pkgfile, # the system cache of the packages file. probably up-to-date.
# and finally, a user's cache of the page, if needed.
- "%s/%s" % [ Cachedir, pkgfile.gsub(".*#{Server}_",'') ]
+ "%s/%s" % [ Cachedir, pkgfile.gsub(/.*#{Server}_/,'') ]
]
}
@@ -111,6 +107,12 @@ packagelists.each { |urlpath, sc, uc|
# session.set_pipe($stderr);
end
begin
+ # the warning with ruby1.8 on the following line
+ # has to do with the resp, data bit, which should
+ # eventually be replaced with (copied from the
+ # docs with the 1.8 net/http.rb)
+ # response = http.get('/index.html')
+ # puts response.body
resp, data = session.get(urlpath,
{ 'If-Modified-Since' =>
cached_time.strftime( "%a, %d %b %Y %H:%M:%S GMT" ) })
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git
More information about the Pkg-wmaker-commits
mailing list