!sUXcTulPzyhnqOiFPL:helsinki-systems.de

NixOS Perl

40 Members
13 Servers

Load older messages


SenderMessageTime
1 Dec 2024
@stigo:matrix.orgstigo Btw, you should use Nix::Store->new instead of new Nix::Store 15:49:55
@stigo:matrix.orgstigo

Maybe:

diff --git a/maintainers/scripts/copy-tarballs.pl b/maintainers/scripts/copy-tarballs.pl
index 30fbac6f002d..6c25471278f8 100755
--- a/maintainers/scripts/copy-tarballs.pl
+++ b/maintainers/scripts/copy-tarballs.pl
@@ -22,7 +22,9 @@ use JSON;
 use Net::Amazon::S3;
 use Nix::Store;

-isValidPath("/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo"); # FIXME: forces Nix::Store initialisation
+my $store = Nix::Store->new();
+
+$store->isValidPath("/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo"); # FIXME: forces Nix::Store initialisation

 sub usage {
     die "Syntax: $0 [--dry-run] [--exclude REGEXP] [--expr EXPR | --file FILES...]\n";
@@ -216,12 +218,12 @@ elsif (defined $expr) {
             }

             # Substitute the output.
-            if (!isValidPath($storePath)) {
+            if (!$store->isValidPath($storePath)) {
                 system("nix-store", "-r", $storePath);
             }

             # Otherwise download the file using nix-prefetch-url.
-            if (!isValidPath($storePath)) {
+            if (!$store->isValidPath($storePath)) {
                 $ENV{QUIET} = 1;
                 $ENV{PRINT_PATH} = 1;
                 my $fh;
15:56:48
@stigo:matrix.orgstigo *

Maybe this works, get's rid of the Undefined subrouting error, but not tested of course :D

diff --git a/maintainers/scripts/copy-tarballs.pl b/maintainers/scripts/copy-tarballs.pl
index 30fbac6f002d..6c25471278f8 100755
--- a/maintainers/scripts/copy-tarballs.pl
+++ b/maintainers/scripts/copy-tarballs.pl
@@ -22,7 +22,9 @@ use JSON;
 use Net::Amazon::S3;
 use Nix::Store;

-isValidPath("/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo"); # FIXME: forces Nix::Store initialisation
+my $store = Nix::Store->new();
+
+$store->isValidPath("/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo"); # FIXME: forces Nix::Store initialisation

 sub usage {
     die "Syntax: $0 [--dry-run] [--exclude REGEXP] [--expr EXPR | --file FILES...]\n";
@@ -216,12 +218,12 @@ elsif (defined $expr) {
             }

             # Substitute the output.
-            if (!isValidPath($storePath)) {
+            if (!$store->isValidPath($storePath)) {
                 system("nix-store", "-r", $storePath);
             }

             # Otherwise download the file using nix-prefetch-url.
-            if (!isValidPath($storePath)) {
+            if (!$store->isValidPath($storePath)) {
                 $ENV{QUIET} = 1;
                 $ENV{PRINT_PATH} = 1;
                 my $fh;
15:57:20
@vcunat:matrix.orgvcunat Maybe the forcing of initialization isn't needed now that we use new()? 15:57:46
@stigo:matrix.orgstigo ¯_(ツ)_/¯ 15:58:00
@stigo:matrix.orgstigo * ¯\_(ツ)_/¯ 15:58:04
@stigo:matrix.orgstigo *

Maybe this works, get's rid of the Undefined subroutine error, but not tested of course :D

diff --git a/maintainers/scripts/copy-tarballs.pl b/maintainers/scripts/copy-tarballs.pl
index 30fbac6f002d..6c25471278f8 100755
--- a/maintainers/scripts/copy-tarballs.pl
+++ b/maintainers/scripts/copy-tarballs.pl
@@ -22,7 +22,9 @@ use JSON;
 use Net::Amazon::S3;
 use Nix::Store;

-isValidPath("/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo"); # FIXME: forces Nix::Store initialisation
+my $store = Nix::Store->new();
+
+$store->isValidPath("/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo"); # FIXME: forces Nix::Store initialisation

 sub usage {
     die "Syntax: $0 [--dry-run] [--exclude REGEXP] [--expr EXPR | --file FILES...]\n";
@@ -216,12 +218,12 @@ elsif (defined $expr) {
             }

             # Substitute the output.
-            if (!isValidPath($storePath)) {
+            if (!$store->isValidPath($storePath)) {
                 system("nix-store", "-r", $storePath);
             }

             # Otherwise download the file using nix-prefetch-url.
-            if (!isValidPath($storePath)) {
+            if (!$store->isValidPath($storePath)) {
                 $ENV{QUIET} = 1;
                 $ENV{PRINT_PATH} = 1;
                 my $fh;
16:03:35
@vcunat:matrix.orgvcunatWith some additional changes this worked. But it uncovered annoying nix issues, so it really is better to stay with the older version for now 😢17:44:58
@vcunat:matrix.orgvcunatBut thank you 17:45:23
@vcunat:matrix.orgvcunat🙂17:45:41
3 Dec 2024
@stigo:matrix.orgstigo changed their display name from stigo (away) to stigo.00:52:10
26 Dec 2024
@10leej:matrix.org@10leej:matrix.org joined the room.01:41:18
@10leej:matrix.org@10leej:matrix.org left the room.01:42:00
@stigo:matrix.orgstigo changed their display name from stigo to stigo 5716.22:15:29
29 Dec 2024
@qbit:tapenet.orgqbitIO::Tty seems broken, is it just me? :D17:03:42
@qbit:tapenet.orgqbit
chmod 755 blib/arch/auto/IO/Tty/Tty.so
Manifying 3 pod documents
Running phase: checkPhase
@nix { "action": "setPhase", "phase": "checkPhase" }
"/nix/store/1i003ijlh9i0mzp6alqby5hg3090pjdx-perl-5.40.0/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Tty.bs blib/arch/auto/IO/Tty/Tty.bs 644
PERL_DL_NONLAZY=1 "/nix/store/1i003ijlh9i0mzp6alqby5hg3090pjdx-perl-5.40.0/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/pty_get_winsize.t .. Cannot open a pty at t/pty_get_winsize.t line 24.
# Looks like your test exited with 2 before it could output anything.
^M                            ^Mt/pty_get_winsize.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 1/1 subtests
t/test.t ............. # Configuration: -DHAVE_DEV_PTMX -DHAVE_PTY_H -DHAVE_TERMIOS_H -DHAVE_TERMIO_H
# Checking for appropriate ioctls:
# TIOCNOTTY
# TIOCSCTTY
trying BSD /dev/pty??...
Cannot open a pty at t/test.t line 32.
^Mt/test.t ............. 1/5
#   Failed test '0 exit code from forked child - Checking that returned fd's don't clash with stdin/out/err'
#   at t/test.t line 46.
#          got: '512'
#     expected: '0'
#  === Checking if child gets pty as controlling terminal
trying BSD /dev/pty??...
Cannot open a pty at t/test.t line 52.
# Looks like your test exited with 2 just after 2.
^M                            ^Mt/test.t ............. Dubious, test returned 2 (wstat 512, 0x200)
Failed 4/5 subtests

Test Summary Report
-------------------
t/pty_get_winsize.t (Wstat: 512 (exited 2) Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 1 tests but ran 0.
t/test.t           (Wstat: 512 (exited 2) Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 5 tests but ran 2.
Files=2, Tests=2,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.05 cusr  0.05 csys =  0.11 CPU)
Result: FAIL
Failed 2/2 test programs. 1/2 subtests failed.
make: *** [Makefile:1056: test_dynamic] Error 2
17:03:45
@stigo:matrix.orgstigoUnable to reproduce on 9d4b1e1468dc808a155f3a1aa2632de302b6ceff, maybe it's a flaky test?17:47:11
@qbit:tapenet.orgqbithm, thanks23:03:52
@qbit:tapenet.orgqbit happens specifically when building rex 23:06:00
@qbit:tapenet.orgqbita2e3dffc7a1281b741c835abd9468ce5abcb54fa23:07:28
@qbit:tapenet.orgqbiteven happens on 9d4b1e1468dc808a155f3a1aa2632de302b6ceff23:08:20
30 Dec 2024
@stigo:matrix.orgstigoHm08:26:15
@stigo:matrix.orgstigoI'll have a look08:26:58
@stigo:matrix.orgstigohttps://github.com/NixOS/nixpkgs/pull/369330 has appeared :D09:36:25
@stigo:matrix.orgstigoHm, IOPty and IOTty points to the same tarball09:53:46
@qbit:tapenet.orgqbitwoo15:26:47
@stigo:matrix.orgstigo changed their display name from stigo 5716 to stigo.16:48:14
1 Jan 2025
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.14:26:17
@stigo:matrix.orgstigoHappy new year 🎉15:16:51
22 Jan 2025
@stigo:matrix.orgstigoI've been a bit busy lately but will try to look at updates in the near future06:30:56

There are no newer messages yet.


Back to Room ListRoom Version: 9