perlcritic: make all open() calls three-argument

[?]
Oct 20, 2021, 2:37 AM
M4FPGVN4YPWIRHA6CPRT2ZZKIGR6BDQ7LJ4SDSZLZLSLMPJBNGWQC

Dependencies

  • [2] T3HCJYPL Implement `yath`-test for the new Gitea plugin
  • [3] 6MNLYIXO perlcritic: explicitly assign the result of readdir/file reads
  • [4] L6PVAEWJ perlcritic: don't open files as bare words
  • [5] 2GK5DOU7 * Downloading closures.
  • [6] 7I2VJDS6 Use pixz instead of bzip2 for compressing nars
  • [7] ZQLF4QLV Replace TestHTTPMockServer with python script
  • [8] O3NM62IZ Support multiple machines files
  • [9] UCJEI7YZ Don't compress already-compressed files.
  • [10] EYAA7MJY hydra-server: Support logs in S3
  • [11] NYC3LZKH * Generate NAR archives on the fly. Necessary for producing channels
  • [12] IN272KZW * Automatically keep all builds in the latest successful release in
  • [13] 3PNG7NIB Remove trailing whitespace
  • [14] I3S23ZI2 Fix registerRoot
  • [15] GX2GISE2 Revert "Don't compress already-compressed files."
  • [16] HTL6HIBM machine-status: Read /etc/nix.machines instead of using the BuildMachines table
  • [17] 4LL3WLON Write Hydra roots as regular files instead of symlinks
  • [18] ALIOF64I * Use IO::Handles instead of old school filehandles. This ensures
  • [19] KI423DCQ Stream logs if possible and remove size limit
  • [20] A63IHCMX * Register GC roots properly.
  • [21] E5NSTNVM fixup perlcritic: indirect new

Change contents

  • replacement in src/lib/Hydra/Helper/Nix.pm at line 144
    [4.24][4.0:79]()
    open my $root, ">$link" or die "cannot create GC root `$link' to `$path'";
    [4.24]
    [4.79]
    open(my $root, ">", $link) or die "cannot create GC root `$link' to `$path'";
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 345
    [4.2084][4.97:145]()
    open my $conf, "<$machinesFile" or die;
    [4.2084]
    [3.0]
    open(my $conf, "<", $machinesFile) or die;
  • replacement in src/lib/Hydra/View/NixClosure.pm at line 17
    [4.3103][4.5:78](),[4.5][4.5:78]()
    open $fh, "nix-store --export `nix-store -qR @storePaths` | gzip |";
    [4.3103]
    [4.1248]
    open($fh, "-|", "nix-store --export `nix-store -qR @storePaths` | gzip");
  • replacement in src/lib/Hydra/View/NixLog.pm at line 20
    [4.824][4.1488:1605]()
    my $doTail = $tail ? " tail -n '$tail' |" : "";
    open $fh, "bzip2 -dc < '$logPath' | $doTail" or die;
    [4.824]
    [4.877]
    my $doTail = $tail ? "| tail -n '$tail'" : "";
    open($fh, "-|", "bzip2 -dc < '$logPath' $doTail") or die;
  • replacement in src/lib/Hydra/View/NixLog.pm at line 24
    [4.1627][4.1627:1688]()
    open $fh, "tail -n '$tail' '$logPath' |" or die;
    [4.1627]
    [4.1688]
    open($fh, "-|", "tail -n '$tail' '$logPath'") or die;
  • replacement in src/lib/Hydra/View/NixLog.pm at line 26
    [4.1705][4.1705:1747]()
    open $fh, "<$logPath" or die;
    [4.1705]
    [4.1747]
    open($fh, "<", $logPath) or die;
  • replacement in src/lib/Hydra/View/NixNAR.pm at line 19
    [4.3115][4.309:376]()
    open $fh, "nix-store --dump '$storePath' | pixz -0 $pParam |";
    [4.3115]
    [4.866]
    open($fh, "-|", "nix-store --dump '$storePath' | pixz -0 $pParam");
  • replacement in t/plugins/gitea.t at line 63
    [2.3498][2.3498:3552]()
    open my $fh, $filename or die ("Can't open(): $!\n");
    [2.3498]
    [2.3552]
    open(my $fh, "<", $filename) or die ("Can't open(): $!\n");