[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
166/376: Shut up "Wide character" warnings in Perl scripts
From: |
Ludovic Courtès |
Subject: |
166/376: Shut up "Wide character" warnings in Perl scripts |
Date: |
Wed, 28 Jan 2015 22:04:46 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 27a01d92c2be3e6c1be23f96d24c3d3358489a87
Author: Eelco Dolstra <address@hidden>
Date: Fri Aug 29 17:48:25 2014 +0200
Shut up "Wide character" warnings in Perl scripts
---
scripts/build-remote.pl.in | 3 +++
scripts/download-from-binary-cache.pl.in | 2 ++
scripts/download-using-manifests.pl.in | 1 +
scripts/nix-build.in | 2 ++
scripts/nix-channel.in | 3 +++
scripts/nix-copy-closure.in | 1 +
scripts/nix-install-package.in | 3 +++
scripts/nix-prefetch-url.in | 4 ++++
scripts/nix-pull.in | 3 +++
scripts/nix-push.in | 3 +++
10 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in
index 2eb3396..faf1616 100755
--- a/scripts/build-remote.pl.in
+++ b/scripts/build-remote.pl.in
@@ -1,5 +1,6 @@
#! @perl@ -w @perlFlags@
+use utf8;
use Fcntl qw(:DEFAULT :flock);
use English '-no_match_vars';
use IO::Handle;
@@ -9,6 +10,8 @@ use Nix::CopyClosure;
use Nix::Store;
no warnings('once');
+binmode STDERR, ":encoding(utf8)";
+
# General operation:
#
diff --git a/scripts/download-from-binary-cache.pl.in
b/scripts/download-from-binary-cache.pl.in
index e09b051..cdce8eb 100644
--- a/scripts/download-from-binary-cache.pl.in
+++ b/scripts/download-from-binary-cache.pl.in
@@ -1,5 +1,6 @@
#! @perl@ -w @perlFlags@
+use utf8;
use DBI;
use DBD::SQLite;
use File::Basename;
@@ -12,6 +13,7 @@ use WWW::Curl::Easy;
use WWW::Curl::Multi;
use strict;
+binmode STDERR, ":encoding(utf8)";
Nix::Config::readConfig;
diff --git a/scripts/download-using-manifests.pl.in
b/scripts/download-using-manifests.pl.in
index e849a93..591cd6b 100755
--- a/scripts/download-using-manifests.pl.in
+++ b/scripts/download-using-manifests.pl.in
@@ -9,6 +9,7 @@ use Nix::Utils;
use POSIX qw(strftime);
STDOUT->autoflush(1);
+binmode STDERR, ":encoding(utf8)";
my $logFile = "$Nix::Config::logDir/downloads";
diff --git a/scripts/nix-build.in b/scripts/nix-build.in
index fb92a49..f8cf318 100755
--- a/scripts/nix-build.in
+++ b/scripts/nix-build.in
@@ -1,10 +1,12 @@
#! @perl@ -w @perlFlags@
+use utf8;
use strict;
use Nix::Config;
use Nix::Store;
use Nix::Utils;
+binmode STDERR, ":encoding(utf8)";
my $dryRun = 0;
my $verbose = 0;
diff --git a/scripts/nix-channel.in b/scripts/nix-channel.in
index 407f274..e45b913 100755
--- a/scripts/nix-channel.in
+++ b/scripts/nix-channel.in
@@ -1,11 +1,14 @@
#! @perl@ -w @perlFlags@
+use utf8;
use strict;
use File::Basename;
use File::Path qw(mkpath);
use Nix::Config;
use Nix::Manifest;
+binmode STDERR, ":encoding(utf8)";
+
Nix::Config::readConfig;
my $manifestDir = $Nix::Config::manifestDir;
diff --git a/scripts/nix-copy-closure.in b/scripts/nix-copy-closure.in
index 10c2a91..f4d1862 100755
--- a/scripts/nix-copy-closure.in
+++ b/scripts/nix-copy-closure.in
@@ -6,6 +6,7 @@ use Nix::Store;
use Nix::CopyClosure;
use List::Util qw(sum);
+binmode STDERR, ":encoding(utf8)";
if (scalar @ARGV < 1) {
print STDERR <<EOF
diff --git a/scripts/nix-install-package.in b/scripts/nix-install-package.in
index 9340f1b..23f6efb 100755
--- a/scripts/nix-install-package.in
+++ b/scripts/nix-install-package.in
@@ -1,9 +1,12 @@
#! @perl@ -w @perlFlags@
+use utf8;
use strict;
use Nix::Config;
use Nix::Utils;
+binmode STDERR, ":encoding(utf8)";
+
# Parse the command line arguments.
my @args = @ARGV;
diff --git a/scripts/nix-prefetch-url.in b/scripts/nix-prefetch-url.in
index 869d29c..6effbe2 100755
--- a/scripts/nix-prefetch-url.in
+++ b/scripts/nix-prefetch-url.in
@@ -1,5 +1,6 @@
#! @perl@ -w @perlFlags@
+use utf8;
use strict;
use File::Basename;
use File::stat;
@@ -7,6 +8,9 @@ use Nix::Store;
use Nix::Config;
use Nix::Utils;
+binmode STDERR, ":encoding(utf8)";
+
+
my $hashType = $ENV{'NIX_HASH_ALGO'} || "sha256"; # obsolete
my $cacheDir = $ENV{'NIX_DOWNLOAD_CACHE'};
diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in
index f9785d8..995b509 100755
--- a/scripts/nix-pull.in
+++ b/scripts/nix-pull.in
@@ -1,9 +1,12 @@
#! @perl@ -w @perlFlags@
+use utf8;
use strict;
use Nix::Config;
use Nix::Manifest;
+binmode STDERR, ":encoding(utf8)";
+
my $manifestDir = $Nix::Config::manifestDir;
diff --git a/scripts/nix-push.in b/scripts/nix-push.in
index b0cb6d0..c6d1877 100755
--- a/scripts/nix-push.in
+++ b/scripts/nix-push.in
@@ -1,5 +1,6 @@
#! @perl@ -w @perlFlags@
+use utf8;
use strict;
use File::Basename;
use File::Path qw(mkpath);
@@ -11,6 +12,8 @@ use Nix::Manifest;
use Nix::Utils;
use Nix::Crypto;
+binmode STDERR, ":encoding(utf8)";
+
my $tmpDir = mkTempDir("nix-push");
my $nixExpr = "$tmpDir/create-nars.nix";
- 159/376: Document the "out" usage in allowedReferences, (continued)
- 159/376: Document the "out" usage in allowedReferences, Ludovic Courtès, 2015/01/28
- 154/376: Use unshare() instead of clone(), Ludovic Courtès, 2015/01/28
- 162/376: Introduce allowedRequisites feature, Ludovic Courtès, 2015/01/28
- 157/376: Fix tests, Ludovic Courtès, 2015/01/28
- 151/376: Use pager for more commands, Ludovic Courtès, 2015/01/28
- 153/376: Fix a segfault in ‘nix-env -qa’, Ludovic Courtès, 2015/01/28
- 164/376: allowedRequisites: Drop stdenv mention, Ludovic Courtès, 2015/01/28
- 160/376: Fix building with Clang, Ludovic Courtès, 2015/01/28
- 170/376: Fix dependency ordering, Ludovic Courtès, 2015/01/28
- 169/376: Hack for supporting Boost on Homebrew, Ludovic Courtès, 2015/01/28
- 166/376: Shut up "Wide character" warnings in Perl scripts,
Ludovic Courtès <=
- 167/376: Add an 'optimiseStore' remote procedure call., Ludovic Courtès, 2015/01/28
- 171/376: Fix build-remote.pl, Ludovic Courtès, 2015/01/28
- 172/376: tests/remote-builds.nix: Time out faster, Ludovic Courtès, 2015/01/28
- 176/376: Add support for using a build directory, Ludovic Courtès, 2015/01/28
- 178/376: Support specifying a JAR manifest, Ludovic Courtès, 2015/01/28
- 181/376: Add some hyperlinks between NIXPATH and -I, Ludovic Courtès, 2015/01/28
- 165/376: Add disallowedReferences / disallowedRequisites, Ludovic Courtès, 2015/01/28
- 173/376: Tweak, Ludovic Courtès, 2015/01/28
- 168/376: Fix boost::too_many_args error, Ludovic Courtès, 2015/01/28
- 174/376: build-remote.pl: UTF-8-decode errors, Ludovic Courtès, 2015/01/28