Author: adsb
Date: 2009-03-04 18:56:38 +0000 (Wed, 04 Mar 2009)
New Revision: 1837
Modified:
trunk/README
trunk/debian/changelog
trunk/debian/control
trunk/scripts/dcontrol.pl
Log:
* dcontrol: Produce "friendly" error messages if liburi-perl and/or
libwww-perl aren't installed.
* debian/control, README: Add liburi-perl to the description of dcontrol.
Modified: trunk/README
===================================================================
--- trunk/README 2009-03-04 18:46:18 UTC (rev 1836)
+++ trunk/README 2009-03-04 18:56:38 UTC (rev 1837)
@@ -57,7 +57,7 @@
file with each of the files referenced therein
- dcontrol: Remotely query package and source control files for all Debian
- distributions. [libwww-perl]
+ distributions. [liburl-perl, libwww-perl]
- dd-list: Given a list of packages, pretty-print it ordered by maintainer.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-03-04 18:46:18 UTC (rev 1836)
+++ trunk/debian/changelog 2009-03-04 18:56:38 UTC (rev 1837)
@@ -1,6 +1,8 @@
devscripts (2.10.47) UNRELEASED; urgency=low
[ Adam D. Barratt ]
+ * dcontrol: Produce "friendly" error messages if liburi-perl and/or
+ libwww-perl aren't installed.
* debdiff:
+ Don't treat an absence of differences as an error when comparing
source packages. (Closes: #515683)
@@ -23,6 +25,7 @@
0 to remove mention of DELAYED. (Closes: #518126)
* rc-alert: Modify the description of the "I" flag to reference the
squeeze-ignore tag rather than etch-ignore.
+ * debian/control, README: Add liburi-perl to the description of dcontrol.
[ James Vega ]
* bts: Include the module name when calling MIME::Base64::encode_base64
Modified: trunk/debian/control
===================================================================
--- trunk/debian/control 2009-03-04 18:46:18 UTC (rev 1836)
+++ trunk/debian/control 2009-03-04 18:56:38 UTC (rev 1837)
@@ -52,7 +52,7 @@
- dcmd: run a given command replacing the name of a .changes or .dsc file
with each of the files referenced therein
- dcontrol: remotely query package and source control files for all Debian
- distributions. [libwww-perl]
+ distributions. [liburl-perl, libwww-perl]
- dd-list: given a list of packages, pretty-print it ordered by maintainer
- debc: display the contents of just-built .debs
- debchange/dch: automagically add entries to debian/changelog files
Modified: trunk/scripts/dcontrol.pl
===================================================================
--- trunk/scripts/dcontrol.pl 2009-03-04 18:46:18 UTC (rev 1836)
+++ trunk/scripts/dcontrol.pl 2009-03-04 18:56:38 UTC (rev 1837)
@@ -21,9 +21,30 @@
use strict;
use File::Basename;
use Getopt::Long;
-use LWP::UserAgent;
-use URI::Escape;
+BEGIN {
+ # Load the URI::Escape and LWP::UserAgent modules safely
+ my $progname = basename($0;,'.pl');
+ eval { require URI::Escape; };
+ if ($@) {
+ if ($@ =~ /^Can\'t locate URI\/Escape\.pm/) {
+ die "$progname: you must have the liburi-perl package installed\nto
use this script\n";
+ }
+ die "$progname: problem loading the URI::Escape module:\n $...@\nhave
you installed the liburi-perl package?\n";
+ }
+ import URI::Escape;
+
+ eval { require LWP::UserAgent; };
+ if ($@) {
+ my $progname = basename $0;
+ if ($@ =~ /^Can\'t locate LWP) {
+ die "$progname: you must have the libwww-perl package installed\nto
use this script\n";
+ }
+ die "$progname: problem loading the LWP::UserAgent module:\n
$...@\nhave you installed the libwww-perl package?\n";
+ }
+ import LWP::UserAgent;
+}
+
# global variables
my $progname = basename($0,'.pl'); # the '.pl' is for when we're debugging
--
To unsubscribe, send mail to [email protected].