[lintian] 02/02: reporting: Use safe_qx instead qx()
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit a6812c766abbcd706a0eb19fae2f5e7baef31a69
Author: Niels Thykier <niels@thykier.net>
Date: Sun Sep 14 13:27:50 2014 +0200
reporting: Use safe_qx instead qx()
Signed-off-by: Niels Thykier <niels@thykier.net>
---
reporting/harness | 6 +++++-
reporting/html_reports | 6 ++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/reporting/harness b/reporting/harness
index fa18a11..f7cdc16 100755
--- a/reporting/harness
+++ b/reporting/harness
@@ -120,7 +120,6 @@ my @lintian_cmd = (
qw(--no-cfg -I -E --pedantic -v --show-overrides),
qw(--exp-output=format=fullewi --packages-from-file -),
);
-my $LINTIAN_VERSION = qx($LINTIAN_ROOT/frontend/lintian --print-version);
my $STATE_DIR = $HARNESS_STATE_DIR;
my $START_TIME = time();
my $state;
@@ -128,6 +127,8 @@ chomp($LINTIAN_VERSION);
# import perl libraries
unshift @INC, "$LINTIAN_ROOT/lib";
+require Lintian::Command;
+import Lintian::Command qw(safe_qx);
require Lintian::Lab;
require Lintian::Lab::Manifest;
require Lintian::Processable;
@@ -137,6 +138,9 @@ require Lintian::Util;
import Lintian::Util qw(open_gz slurp_entire_file strip visit_dpkg_paragraph
load_state_cache find_backlog);
+my $LINTIAN_VERSION
+ = safe_qx("$LINTIAN_ROOT/frontend/lintian",'--print-version');
+
# turn file buffering off
STDOUT->autoflush;
diff --git a/reporting/html_reports b/reporting/html_reports
index 8859736..c71a37f 100755
--- a/reporting/html_reports
+++ b/reporting/html_reports
@@ -56,6 +56,7 @@ our $LINTIAN_TIMESTAMP
# Import Lintian Perl libraries.
use lib "$LINTIAN_ROOT/lib";
+use Lintian::Command qw(safe_qx);
use Lintian::Data;
use Lintian::Internal::FrontendUtil qw(split_tag);
use Lintian::Lab;
@@ -90,8 +91,9 @@ $statistics_file = "$HARNESS_STATE_DIR/statistics";
Lintian::Data->set_vendor($profile);
# Set the Lintian version, current timestamp, and archive timestamp.
-our $LINTIAN_VERSION = `$LINTIAN_ROOT/frontend/lintian --print-version`;
-our $timestamp = `date -u --rfc-822`;
+our $LINTIAN_VERSION
+ = safe_qx("$LINTIAN_ROOT/frontend/lintian",'--print-version');
+our $timestamp = safe_qx(qw(date -u --rfc-822));
our $mirror_timestamp = slurp_entire_file($LINTIAN_TIMESTAMP);
chomp($LINTIAN_VERSION, $timestamp);
$mirror_timestamp =~ s/\n.*//s;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: