The following commit has been merged in the master branch: commit 288aa90e881c1aaa8ddacdeeed8a5631142ffe67 Author: Guillem Jover <guil...@debian.org> Date: Sun Jun 14 19:02:55 2009 +0200
Dpkg::ErrorHandling: Remove unused warnerror() and $warnable_error Do not pass over -W and -E from dpkg-buildpackage to dpkg-source anymore and warn directly about its deprecated status. diff --git a/scripts/Dpkg/ErrorHandling.pm b/scripts/Dpkg/ErrorHandling.pm index 968ced1..877663e 100644 --- a/scripts/Dpkg/ErrorHandling.pm +++ b/scripts/Dpkg/ErrorHandling.pm @@ -4,11 +4,10 @@ use Dpkg; use Dpkg::Gettext; use base qw(Exporter); -our @EXPORT = qw(info warning warnerror error errormsg +our @EXPORT = qw(info warning error errormsg syserr internerr subprocerr usageerr syntaxerr); -our @EXPORT_OK = qw(report unknown $warnable_error $quiet_warnings); +our @EXPORT_OK = qw(report unknown $quiet_warnings); -our $warnable_error = 1; our $quiet_warnings = 0; sub report(@) @@ -29,15 +28,6 @@ sub warning($;@) warn report(_g("warning"), @_) if (!$quiet_warnings); } -sub warnerror(@) -{ - if ($warnable_error) { - warning(@_); - } else { - error(@_); - } -} - sub syserr($;@) { my $msg = shift; diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl index ba751b3..bdab775 100755 --- a/scripts/dpkg-buildpackage.pl +++ b/scripts/dpkg-buildpackage.pl @@ -9,7 +9,7 @@ use POSIX; use Dpkg; use Dpkg::Gettext; -use Dpkg::ErrorHandling qw(:DEFAULT $warnable_error); +use Dpkg::ErrorHandling; use Dpkg::BuildOptions; use Dpkg::Compression; use Dpkg::Version qw(check_version); @@ -71,8 +71,6 @@ Options: -nc do not clean source tree (implies -b). -tc clean source tree when finished. -ap add pause before starting signature process. - -E turn certain warnings into errors. } passed to - -W when -E is turned on, -W turns it off. } dpkg-source -i[<regex>] ignore diffs of files matching regex. } only passed -I[<pattern>] filter out files when building tarballs. } to dpkg-source --admindir=<directory> @@ -186,12 +184,9 @@ while (@ARGV) { $changedby = $1; } elsif (/^-C(.*)$/) { $desc = $1; - } elsif (/^-W$/) { - $warnable_error = 1; - push @passopts, '-W'; - } elsif (/^-E$/) { - $warnable_error = 0; - push @passopts, '-E'; + } elsif (m/^-[EW]$/) { + # Deprecated option + warning(_g("-E and -W are deprecated, they are without effect")); } elsif (/^-R(.*)$/) { @debian_rules = split /\s+/, $1; } else { -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org