Bug 267416 - Mk/bsd.port.mk: install-missing-packages fails in automated runs without TTY
Summary: Mk/bsd.port.mk: install-missing-packages fails in automated runs without TTY
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-29 12:08 UTC by Pat Maddox
Modified: 2023-01-10 20:42 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pat Maddox 2022-10-29 12:08:36 UTC
I am trying to run `make install-missing-packages` on Cirrus CI. When I do, it fails with:

    xargs: can't open /dev/tty: Device not configured

The `install-missing-packages` target includes a line with `${XARGS} -o` where `-o` means `Reopen stdin as /dev/tty in the child process` (see xargs(1)).

I'm not sure why `-o` is in there, what else might be expecting it... but when I removed it, it worked fine:

    sed -i '' -e 's:${XARGS} -o:${XARGS}:' /usr/ports/Mk/bsd.port.mk

or this patch:

    --- bsd.port.mk	2022-10-29 04:59:04.058879000 -0700
    +++ bsd.port.mk-fixed	2022-10-29 04:59:58.919773000 -0700
    @@ -4323,7 +4323,7 @@
     install-missing-packages:
     	@_dirs=$$(${MISSING-DEPENDS-LIST}); \
     	${ECHO_CMD} "$${_dirs}" | ${SED} "s%${PORTSDIR}/%%g" | \
    -		${SU_CMD} "${XARGS} -o ${PKG_BIN} install -A"
    +		${SU_CMD} "${XARGS} ${PKG_BIN} install -A"
     
     ################################################################
     # Everything after here are internal targets and really
Comment 1 Pat Maddox 2022-10-29 22:44:00 UTC
I started a review at https://reviews.freebsd.org/D37211