[lintian] 02/02: commands: Make reporting-* ".pm" style tools
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 60ecc1bc1b05295004e85a78fca18c4a19b49ce0
Author: Niels Thykier <niels@thykier.net>
Date: Fri Apr 3 18:55:08 2015 +0200
commands: Make reporting-* ".pm" style tools
Signed-off-by: Niels Thykier <niels@thykier.net>
---
...intian-harness => reporting-lintian-harness.pm} | 28 ----------------------
...eporting-sync-state => reporting-sync-state.pm} | 28 ----------------------
2 files changed, 56 deletions(-)
diff --git a/commands/reporting-lintian-harness b/commands/reporting-lintian-harness.pm
similarity index 96%
rename from commands/reporting-lintian-harness
rename to commands/reporting-lintian-harness.pm
index 9fe4b21..f64b255 100755
--- a/commands/reporting-lintian-harness
+++ b/commands/reporting-lintian-harness.pm
@@ -36,28 +36,6 @@ use Getopt::Long();
use List::MoreUtils qw(first_index);
use POSIX qw(strftime);
-our @INCLUDE_DIRS;
-
-BEGIN {
- if (!exists($ENV{'LINTIAN_INCLUDE_DIRS'})) {
- my $basename = basename($0);
- print STDERR
- "Do not call $basename directly, use dplint $basename instead\n";
- exit(1);
- }
- my $dirs = $ENV{'LINTIAN_INCLUDE_DIRS'};
- if ($dirs =~ m{\A (.*) \Z}xsm) {
- # Untaint LINTIAN_INCLUDE_DIRS
- $dirs = $1;
- }
- @INCLUDE_DIRS = split(':', $dirs);
- my $libdir = $INCLUDE_DIRS[-1] . '/lib';
- if (-d $libdir) {
- require lib;
- import lib $libdir;
- }
-}
-
use Lintian::Command qw(safe_qx);
use Lintian::Util qw(find_backlog load_state_cache save_state_cache untaint);
@@ -96,12 +74,6 @@ sub main {
exit(harness_lintian());
}
-eval {main();};
-if (my $err = $@) {
- print STDERR "$@\n";
- exit(255);
-}
-
### END OF SCRIPT -- below are helper subroutines ###
sub check_parameters {
diff --git a/commands/reporting-sync-state b/commands/reporting-sync-state.pm
similarity index 96%
rename from commands/reporting-sync-state
rename to commands/reporting-sync-state.pm
index eafe838..a650417 100755
--- a/commands/reporting-sync-state
+++ b/commands/reporting-sync-state.pm
@@ -25,28 +25,6 @@ use autodie;
use Getopt::Long();
use File::Basename qw(basename);
-our @INCLUDE_DIRS;
-
-BEGIN {
- if (!exists($ENV{'LINTIAN_INCLUDE_DIRS'})) {
- my $basename = basename($0);
- print STDERR
- "Do not call $basename directly, use dplint $basename instead\n";
- exit(1);
- }
- my $dirs = $ENV{'LINTIAN_INCLUDE_DIRS'};
- if ($dirs =~ m{\A (.*) \Z}xsm) {
- # Untaint LINTIAN_INCLUDE_DIRS
- $dirs = $1;
- }
- @INCLUDE_DIRS = split(':', $dirs);
- my $libdir = $INCLUDE_DIRS[-1] . '/lib';
- if (-d $libdir) {
- require lib;
- import lib $libdir;
- }
-}
-
use Lintian::Lab;
use Lintian::Relation::Version qw(versions_comparator);
use Lintian::Util qw(
@@ -122,12 +100,6 @@ sub main {
exit(0);
}
-eval {main();};
-if (my $err = $@) {
- print STDERR "$@\n";
- exit(255);
-}
-
# State:
# group-id => {
# 'last-processed-by' => <version or undef>,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: