freebsd/poudriere

poudriere status -a fails in mapfile_write with empty sets

yannk opened this issue · 1 comments

yannk commented

Prerequisites

  • Have you checked for an existing issue describing your problem?
  • Are you running the latest version?
  • Is your ports tree recent?
  • Is your FreeBSD Host on a supported release?

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"
 }

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