mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Shut up "Wide character" warnings in Perl scripts
This commit is contained in:
parent
b72e93bca8
commit
27a01d92c2
10 changed files with 25 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
#! @perl@ -w @perlFlags@
|
#! @perl@ -w @perlFlags@
|
||||||
|
|
||||||
|
use utf8;
|
||||||
use Fcntl qw(:DEFAULT :flock);
|
use Fcntl qw(:DEFAULT :flock);
|
||||||
use English '-no_match_vars';
|
use English '-no_match_vars';
|
||||||
use IO::Handle;
|
use IO::Handle;
|
||||||
|
@ -9,6 +10,8 @@ use Nix::CopyClosure;
|
||||||
use Nix::Store;
|
use Nix::Store;
|
||||||
no warnings('once');
|
no warnings('once');
|
||||||
|
|
||||||
|
binmode STDERR, ":encoding(utf8)";
|
||||||
|
|
||||||
|
|
||||||
# General operation:
|
# General operation:
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#! @perl@ -w @perlFlags@
|
#! @perl@ -w @perlFlags@
|
||||||
|
|
||||||
|
use utf8;
|
||||||
use DBI;
|
use DBI;
|
||||||
use DBD::SQLite;
|
use DBD::SQLite;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
|
@ -12,6 +13,7 @@ use WWW::Curl::Easy;
|
||||||
use WWW::Curl::Multi;
|
use WWW::Curl::Multi;
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
|
binmode STDERR, ":encoding(utf8)";
|
||||||
|
|
||||||
Nix::Config::readConfig;
|
Nix::Config::readConfig;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ use Nix::Utils;
|
||||||
use POSIX qw(strftime);
|
use POSIX qw(strftime);
|
||||||
|
|
||||||
STDOUT->autoflush(1);
|
STDOUT->autoflush(1);
|
||||||
|
binmode STDERR, ":encoding(utf8)";
|
||||||
|
|
||||||
my $logFile = "$Nix::Config::logDir/downloads";
|
my $logFile = "$Nix::Config::logDir/downloads";
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
#! @perl@ -w @perlFlags@
|
#! @perl@ -w @perlFlags@
|
||||||
|
|
||||||
|
use utf8;
|
||||||
use strict;
|
use strict;
|
||||||
use Nix::Config;
|
use Nix::Config;
|
||||||
use Nix::Store;
|
use Nix::Store;
|
||||||
use Nix::Utils;
|
use Nix::Utils;
|
||||||
|
|
||||||
|
binmode STDERR, ":encoding(utf8)";
|
||||||
|
|
||||||
my $dryRun = 0;
|
my $dryRun = 0;
|
||||||
my $verbose = 0;
|
my $verbose = 0;
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
#! @perl@ -w @perlFlags@
|
#! @perl@ -w @perlFlags@
|
||||||
|
|
||||||
|
use utf8;
|
||||||
use strict;
|
use strict;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
use File::Path qw(mkpath);
|
use File::Path qw(mkpath);
|
||||||
use Nix::Config;
|
use Nix::Config;
|
||||||
use Nix::Manifest;
|
use Nix::Manifest;
|
||||||
|
|
||||||
|
binmode STDERR, ":encoding(utf8)";
|
||||||
|
|
||||||
Nix::Config::readConfig;
|
Nix::Config::readConfig;
|
||||||
|
|
||||||
my $manifestDir = $Nix::Config::manifestDir;
|
my $manifestDir = $Nix::Config::manifestDir;
|
||||||
|
|
|
@ -6,6 +6,7 @@ use Nix::Store;
|
||||||
use Nix::CopyClosure;
|
use Nix::CopyClosure;
|
||||||
use List::Util qw(sum);
|
use List::Util qw(sum);
|
||||||
|
|
||||||
|
binmode STDERR, ":encoding(utf8)";
|
||||||
|
|
||||||
if (scalar @ARGV < 1) {
|
if (scalar @ARGV < 1) {
|
||||||
print STDERR <<EOF
|
print STDERR <<EOF
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
#! @perl@ -w @perlFlags@
|
#! @perl@ -w @perlFlags@
|
||||||
|
|
||||||
|
use utf8;
|
||||||
use strict;
|
use strict;
|
||||||
use Nix::Config;
|
use Nix::Config;
|
||||||
use Nix::Utils;
|
use Nix::Utils;
|
||||||
|
|
||||||
|
binmode STDERR, ":encoding(utf8)";
|
||||||
|
|
||||||
|
|
||||||
# Parse the command line arguments.
|
# Parse the command line arguments.
|
||||||
my @args = @ARGV;
|
my @args = @ARGV;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#! @perl@ -w @perlFlags@
|
#! @perl@ -w @perlFlags@
|
||||||
|
|
||||||
|
use utf8;
|
||||||
use strict;
|
use strict;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
use File::stat;
|
use File::stat;
|
||||||
|
@ -7,6 +8,9 @@ use Nix::Store;
|
||||||
use Nix::Config;
|
use Nix::Config;
|
||||||
use Nix::Utils;
|
use Nix::Utils;
|
||||||
|
|
||||||
|
binmode STDERR, ":encoding(utf8)";
|
||||||
|
|
||||||
|
|
||||||
my $hashType = $ENV{'NIX_HASH_ALGO'} || "sha256"; # obsolete
|
my $hashType = $ENV{'NIX_HASH_ALGO'} || "sha256"; # obsolete
|
||||||
my $cacheDir = $ENV{'NIX_DOWNLOAD_CACHE'};
|
my $cacheDir = $ENV{'NIX_DOWNLOAD_CACHE'};
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
#! @perl@ -w @perlFlags@
|
#! @perl@ -w @perlFlags@
|
||||||
|
|
||||||
|
use utf8;
|
||||||
use strict;
|
use strict;
|
||||||
use Nix::Config;
|
use Nix::Config;
|
||||||
use Nix::Manifest;
|
use Nix::Manifest;
|
||||||
|
|
||||||
|
binmode STDERR, ":encoding(utf8)";
|
||||||
|
|
||||||
my $manifestDir = $Nix::Config::manifestDir;
|
my $manifestDir = $Nix::Config::manifestDir;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#! @perl@ -w @perlFlags@
|
#! @perl@ -w @perlFlags@
|
||||||
|
|
||||||
|
use utf8;
|
||||||
use strict;
|
use strict;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
use File::Path qw(mkpath);
|
use File::Path qw(mkpath);
|
||||||
|
@ -11,6 +12,8 @@ use Nix::Manifest;
|
||||||
use Nix::Utils;
|
use Nix::Utils;
|
||||||
use Nix::Crypto;
|
use Nix::Crypto;
|
||||||
|
|
||||||
|
binmode STDERR, ":encoding(utf8)";
|
||||||
|
|
||||||
my $tmpDir = mkTempDir("nix-push");
|
my $tmpDir = mkTempDir("nix-push");
|
||||||
|
|
||||||
my $nixExpr = "$tmpDir/create-nars.nix";
|
my $nixExpr = "$tmpDir/create-nars.nix";
|
||||||
|
|
Loading…
Reference in a new issue