Commit 44c1c52
committed
M9.R.37.2: fix launcher $@ clobber that silently dropped --automated args
ROOT CAUSE OF THE M9.R.36 SILENT WEDGE.
reproos-installer-launcher.sh used set -- "$d"/*.so* inside a
loop body to check whether a /nix/store/*/lib dir had any *.so* files
before adding it to LD_LIBRARY_PATH. set -- overwrites the
script's positional parameters ($@) on every iteration. The launcher
later did exec env ... /usr/bin/reproos-installer "$@" — but by
then $@ had been clobbered to whatever the LAST loop iteration's glob
expanded to. By alphabetical /nix/store ordering that was
/nix/store/.../pcsclite-2.3.0-lib/lib/*.so*, so the installer was
exec-ed with six libpcsclite .so paths as its argv — and --automated
/etc/reproos/auto-config.toml was silently DROPPED.
Consequence: the installer fell into GUI mode (no --automated flag),
constructed a QQmlApplicationEngine, loaded main.qml, walked every
nix-store /lib dir in LD_LIBRARY_PATH searching for libc.so.6 +
QtQuick.Controls. That dlopen() churn (visible in
/tmp/installer.strace as an unending sequence of ENOENT openat calls
against /nix/store/*/lib/libc.so.6) looked like a silent wedge but
was just slow non-progress. The actual install() function never
ran, which is why Phase 1 / Phase 2 / appendLog stderr lines never
appeared.
FIX: wrap the glob-existence test in a subshell so $@ is not
clobbered:
if ( set -- "$d"/*.so*; [ -e "$1" ] ); then ... fi
The same buggy pattern lived in the sister GUI launcher
(/usr/bin/reproos-installer-launcher); that one execs sway not the
installer so the user-visible symptom was masked, but the fix is
identical and lands here too as a regression guard.
Diagnostic infrastructure from M9.R.37.1 (strace -f -ttt + kernel
stack sampler + stdbuf -oL -eL) stays in place — useful for future
gaps. The current sampler tracks PID $$ recorded BEFORE the strace
exec; after exec $$ becomes strace itself (which sits in do_wait),
so the visible kernel stacks are strace's wait4, not the installer's.
Re-run with this fix should expose Phase 1+'s actual behaviour.1 parent d6c6c93 commit 44c1c52
1 file changed
Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
477 | 483 | | |
478 | 484 | | |
479 | 485 | | |
480 | 486 | | |
481 | 487 | | |
482 | | - | |
483 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
484 | 491 | | |
485 | 492 | | |
486 | 493 | | |
| |||
603 | 610 | | |
604 | 611 | | |
605 | 612 | | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
606 | 625 | | |
607 | 626 | | |
608 | 627 | | |
609 | 628 | | |
610 | 629 | | |
611 | 630 | | |
612 | 631 | | |
613 | | - | |
614 | | - | |
| 632 | + | |
615 | 633 | | |
616 | 634 | | |
617 | 635 | | |
| |||
0 commit comments