[SCM] Git repository for devscripts branch, master, updated. v2.12.4-156-gb14b00b
Benjamin Drung
bdrung at debian.org
Sun Feb 17 16:52:40 UTC 2013
The following commit has been merged in the master branch:
commit b14b00b8e6d4f7cf3efb7690c1d3f697ac018e8e
Author: Benjamin Drung <bdrung at debian.org>
Date: Sun Feb 17 17:52:33 2013 +0100
rc-alert: Support using curl as alternative to wget.
Closes: #690024
diff --git a/README b/README
index 95d2229..1aacc8c 100644
--- a/README
+++ b/README
@@ -201,7 +201,8 @@ And now, in mostly alphabetical order, the scripts:
- pts-subscribe: subscribe to the PTS (Package Tracking System) for a
limited period of time [bsd-mailx | mailx, at]
-- rc-alert: list installed packages which have release-critical bugs [wget]
+- rc-alert: list installed packages which have release-critical bugs
+ [wget | curl]
- rmadison: remotely query the Debian archive database about packages
[liburi-perl, wget | curl]
diff --git a/debian/changelog b/debian/changelog
index 080769c..69ef384 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -83,6 +83,7 @@ devscripts (2.13.0) UNRELEASED; urgency=low
+ check for the use of $GLOBIGNORE
[ Regid Ichira ]
+ * rc-alert: Support using curl as alternative to wget. (Closes: #690024)
* wnpp-alert: Support using curl as alternative to wget. (Closes: #690056)
* wnpp-check: Support using curl as alternative to wget. (Closes: #690059)
diff --git a/debian/control b/debian/control
index 55b8d29..377da0e 100644
--- a/debian/control
+++ b/debian/control
@@ -178,7 +178,8 @@ Description: scripts to make the life of a Debian Package maintainer easier
[libtimedate-perl, gnuplot]
- pts-subscribe: subscribe to the PTS for a limited period of time
[bsd-mailx | mailx, at]
- - rc-alert: list installed packages which have release-critical bugs [wget]
+ - rc-alert: list installed packages which have release-critical bugs
+ [wget | curl]
- rmadison: remotely query the Debian archive database about packages
[liburi-perl, wget | curl]
- suspicious-source: output a list of files which are not common source
diff --git a/scripts/rc-alert.pl b/scripts/rc-alert.pl
index 571ce1e..6169352 100755
--- a/scripts/rc-alert.pl
+++ b/scripts/rc-alert.pl
@@ -158,8 +158,16 @@ $excludedists = remove_duplicate_values(uc($excludedists));
## First download the RC bugs page
-unless (system("command -v wget >/dev/null 2>&1") == 0) {
- die "$progname: this program requires the wget package to be installed\n";
+my $curl_or_wget;
+my $getcommand;
+if (system("command -v wget >/dev/null 2>&1") == 0) {
+ $curl_or_wget = "wget";
+ $getcommand = "wget -q -O -";
+} elsif (system("command -v curl >/dev/null 2>&1") == 0) {
+ $curl_or_wget = "curl";
+ $getcommand = "curl -qs";
+} else {
+ die "$progname: this program requires either the wget or curl package to be installed\n";
}
@@ -171,16 +179,24 @@ if (! -d $cachedir and $forcecache) {
if (-d $cachedir) {
chdir $cachedir or die "$progname: can't cd $cachedir: $!\n";
- # Either use the cached version because the remote hasn't been updated
- # (-N) or download a complete new copy (--no-continue)
- if (system('wget', '-qN', '--no-continue', $url) != 0) {
- die "$progname: wget failed!\n";
+ if ("$curl_or_wget" eq "wget") {
+ # Either use the cached version because the remote hasn't been
+ # updated (-N) or download a complete new copy (--no-continue)
+ if (system('wget', '-qN', '--no-continue', $url) != 0) {
+ die "$progname: wget failed!\n";
+ }
+ } elsif ("$curl_or_wget" eq "curl") {
+ if (system('curl', '-qsR', $url) != 0) {
+ die "$progname: curl failed!\n";
+ }
+ } else {
+ die "$progname: Unknown download program $curl_or_wget!\n";
}
open BUGS, $cachefile or die "$progname: could not read $cachefile: $!\n";
}
else {
- open BUGS, "wget -q -O - $url |" or
- die "$progname: could not run wget: $!\n";
+ open BUGS, "$getcommand $url |" or
+ die "$progname: could not run $curl_or_wget: $!\n";
}
## Get list of installed packages (not source packages)
@@ -204,7 +220,7 @@ if ($popcon) {
or die "$progname: Unable to access popcon data: $!";
$pc_regex = '(\d+)\s\d+\s(\S+)';
} else {
- open POPCON, "wget -q -O - http://popcon.debian.org/by_$pc_by.gz | gunzip -c |"
+ open POPCON, "$getcommand http://popcon.debian.org/by_$pc_by.gz | gunzip -c |"
or die "$progname: Not able to receive remote popcon data!";
$pc_regex = '(\d+)\s+(\S+)\s+(\d+\s+){5}\(.*\)';
}
--
Git repository for devscripts
More information about the devscripts-devel
mailing list