Fix bar::units-shell / bar::lx-shell on hosts without script(1) - #63
Open
keithharvey wants to merge 1 commit into
Open
Fix bar::units-shell / bar::lx-shell on hosts without script(1)#63keithharvey wants to merge 1 commit into
keithharvey wants to merge 1 commit into
Conversation
bar::units-shell and bar::lx-shell died with scripts/common.sh: line 250: exec: script: not found on hosts without script(1). Fedora ships it in a separate util-linux-script subpackage, and image-based distros don't necessarily pull that in -- Bazzite 44 doesn't, so both recipes were unusable there. The wrapper isn't needed. A just recipe inherits the caller's terminal on stdin and stdout, and distrobox enter allocates a tty itself unless it finds neither. Calling it directly also drops the printf %q dance, which only existed because script parses its argument through /bin/sh.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
just bar::units-shellandjust bar::lx-shellfail immediately on some hosts:distrobox_exec_interactivewrappeddistrobox enterinscript -qecto force a PTY. Fedora shipsscript(1)in a separateutil-linux-scriptsubpackage rather than inutil-linux, and image-based distros don't necessarily include it. Bazzite 44 doesn't, so both recipes are unusable there and there's no clean way to layer a package in just to get them back.Worth noting the container side is unaffected —
fedora:43(ourdev.Containerfilebase) does pull inutil-linux-script, soscriptexists insidebar-devbut not outside it. The failure is purely host-side.Fix
Drop the wrapper and call
distrobox enterdirectly.The PTY wrapper was never load-bearing. A
justrecipe inherits the caller's terminal on both stdin and stdout, anddistrobox-enterallocates a tty itself — it only falls back to headless when it finds neither (if [ ! -t 0 ] || [ ! -t 1 ]). Wrapping it inscriptjust added a host dependency to get a tty that was already there.Calling it directly also removes the
printf %qquoting loop, which existed only becausescriptparses its argument through/bin/sh. Passing argv straight through needs no quoting.Verification
On Bazzite 44 (host has no
script(1)), drivingjust bar::units-shellunder a real pty:Confirmed separately that a
justrecipe seesSTDIN_TTY/STDOUT_TTY, and thatdistrobox enterunder a pty passes the tty through to the command (ttyreports/dev/pts/0,test -t 0succeeds).just doctorclean, 23 passed.LLM Disclosure
Diagnosed and drafted with Claude Code; reviewed and verified by me on the affected host.