[Reproducible-commits] [dpkg] 10/40: scripts, dselsect/methods: Switch from `` to operator qx()
Jérémy Bobbio
lunar at moszumanska.debian.org
Sat May 30 09:52:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.
commit 9163f5e583b4202f6119a7f645792e320a12c7fd
Author: Guillem Jover <guillem at debian.org>
Date: Thu May 21 20:10:37 2015 +0200
scripts, dselsect/methods: Switch from `` to operator qx()
---
dselect/methods/Dselect/Ftp.pm | 4 ++--
dselect/methods/ftp/install.pl | 8 ++++----
dselect/methods/ftp/setup.pl | 6 +++---
dselect/methods/ftp/update.pl | 2 +-
scripts/Dpkg/Arch.pm | 4 ++--
scripts/Dpkg/Source/Package/V3/Git.pm | 2 +-
6 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dselect/methods/Dselect/Ftp.pm b/dselect/methods/Dselect/Ftp.pm
index e742bea..f091f5e 100644
--- a/dselect/methods/Dselect/Ftp.pm
+++ b/dselect/methods/Dselect/Ftp.pm
@@ -155,9 +155,9 @@ sub edit_config {
sub add_site {
my $pas = 1;
my $user = 'anonymous';
- my $email = `whoami`;
+ my $email = qx(whoami);
chomp $email;
- $email .= '@' . `cat /etc/mailname || dnsdomainname`;
+ $email .= '@' . qx(cat /etc/mailname || dnsdomainname);
chomp $email;
my $dir = '/debian';
diff --git a/dselect/methods/ftp/install.pl b/dselect/methods/ftp/install.pl
index 154239b..b183d15 100755
--- a/dselect/methods/ftp/install.pl
+++ b/dselect/methods/ftp/install.pl
@@ -208,7 +208,7 @@ my $dldir = $CONFIG{dldir};
# md5sum
sub md5sum($) {
my $fn = shift;
- my $m = `md5sum $fn`;
+ my $m = qx(md5sum $fn);
$m = (split(' ', $m))[0];
$md5sums{"$dldir/$fn"} = $m;
return $m;
@@ -269,13 +269,13 @@ foreach my $pkg (keys(%pkgs)) {
}
}
-my $avsp = `df -Pk $dldir| awk '{ print \$4}' | tail -n 1`;
+my $avsp = qx(df -Pk $dldir| awk '{ print \$4}' | tail -n 1);
chomp $avsp;
print "\nApproximate total space required: ${totsize}k\n";
print "Available space in $dldir: ${avsp}k\n";
-#$avsp = `df -k $::dldir| paste -s | awk '{ print \$11}'`;
+#$avsp = qx(df -k $::dldir| paste -s | awk '{ print \$11});
#chomp $avsp;
if($totsize == 0) {
@@ -560,7 +560,7 @@ if (yesno('y', "\nDo you want to install the files fetched")) {
print "Installing files...\n";
#Installing pre-dependent package before !
my (@flds, $package, @filename, $r);
- while (@flds = `dpkg --predep-package`, $? == 0) {
+ while (@flds = qx(dpkg --predep-package), $? == 0) {
foreach my $field (@flds) {
$field =~ s/\s*\n//;
$package = $field if $field =~ s/^Package: //i;
diff --git a/dselect/methods/ftp/setup.pl b/dselect/methods/ftp/setup.pl
index a527a73..0e661cf 100755
--- a/dselect/methods/ftp/setup.pl
+++ b/dselect/methods/ftp/setup.pl
@@ -39,13 +39,13 @@ if ($option eq 'manual') {
#print "vardir: $vardir, method: $method, option: $option\n";
#Defaults
-my $arch=`dpkg --print-architecture`;
+my $arch = qx(dpkg --print-architecture);
$arch='i386' if $?;
chomp $arch;
-my $logname = `whoami`;
+my $logname = qx(whoami);
chomp $logname;
-my $host = `cat /etc/mailname || dnsdomainname`;
+my $host = qx(cat /etc/mailname || dnsdomainname);
chomp $host;
$CONFIG{dldir} = 'debian';
diff --git a/dselect/methods/ftp/update.pl b/dselect/methods/ftp/update.pl
index e1cc0b7..4a81366 100755
--- a/dselect/methods/ftp/update.pl
+++ b/dselect/methods/ftp/update.pl
@@ -52,7 +52,7 @@ if ($option eq 'manual') {
#print "vardir: $vardir, method: $method, option: $option\n";
-my $arch=`dpkg --print-architecture`;
+my $arch = qx(dpkg --print-architecture);
$arch='i386' if $?;
chomp $arch;
my $exit = 0;
diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm
index dce20fe..c784704 100644
--- a/scripts/Dpkg/Arch.pm
+++ b/scripts/Dpkg/Arch.pm
@@ -71,7 +71,7 @@ sub get_raw_build_arch()
# dpkg-architecture itself, by avoiding computing the DEB_BUILD_
# variables when they are not requested.
- $build_arch = `dpkg --print-architecture`;
+ $build_arch = qx(dpkg --print-architecture);
syserr('dpkg --print-architecture failed') if $? >> 8;
chomp $build_arch;
@@ -90,7 +90,7 @@ sub get_build_arch()
{
return $gcc_host_gnu_type if defined $gcc_host_gnu_type;
- $gcc_host_gnu_type = `\${CC:-gcc} -dumpmachine`;
+ $gcc_host_gnu_type = qx(\${CC:-gcc} -dumpmachine);
if ($? >> 8) {
$gcc_host_gnu_type = '';
} else {
diff --git a/scripts/Dpkg/Source/Package/V3/Git.pm b/scripts/Dpkg/Source/Package/V3/Git.pm
index a5a97a5..97b7aff 100644
--- a/scripts/Dpkg/Source/Package/V3/Git.pm
+++ b/scripts/Dpkg/Source/Package/V3/Git.pm
@@ -109,7 +109,7 @@ sub do_build {
# equivalent to the ones git status finds, and remove any
# ignored files from it.
my @ignores = '--exclude-per-directory=.gitignore';
- my $core_excludesfile = `git config --get core.excludesfile`;
+ my $core_excludesfile = qx(git config --get core.excludesfile);
chomp $core_excludesfile;
if (length $core_excludesfile && -e $core_excludesfile) {
push @ignores, "--exclude-from=$core_excludesfile";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list