freebsd / poudriere

Port/Package build and test system
https://github.com/freebsd/poudriere/wiki
BSD 2-Clause "Simplified" License
379 stars 161 forks source link

poudriere status -a fails in mapfile_write with empty sets #1060

Closed yannk closed 8 months ago

yannk commented 1 year ago

Prerequisites

Describe the bug

I do not use sets, and status fails on displaying those because nextopt poudriere shell builtin chokes on the default value of the set: -.

$ poudriere status -a
=>> Warning: Looking up all matching builds. This may take a while.
mapfile_write: Illegal option -
=>> Error: mapfile_write

Potential fix:

diff --git a/src/share/poudriere/include/display.sh b/src/share/poudriere/include/display.sh
index b4d480a7..898f9579 100644
--- a/src/share/poudriere/include/display.sh
+++ b/src/share/poudriere/include/display.sh
@@ -108,7 +108,7 @@ display_add() {
        IFS="${DISPLAY_SEP}"
        line="$@"
        unset IFS
-       mapfile_write "${_DISPLAY_MAPFILE}" "${line}" ||
+       mapfile_write "${_DISPLAY_MAPFILE}" -- "${line}" ||
            err ${EX_SOFTWARE} "mapfile_write"
 }
fsmeets commented 8 months ago

I'm seeing the same thing. The proposed patch does help.