tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Fix subst SUBST_NOOP_OK?=yes fallout

The switch back to SUBST_NOOP_OK?=yes appears to kill the subst code
at least on macOS when using shells/pdksh as the primary shell.

This can be seen very clearly with the huge number of broken packages
with the most recent bulk build:

Performing the build manually with PKG_DEBUG_LEVEL=2, the last few
lines are:

  + /bin/rm -f configure.subst.sav
  + continue
  + [ no,yes = no,no ]
  *** Error code 1

which corresponds to code at the end of mk/ that doesn't
handle the failure case correctly, and falls foul of set -e.

I'd like to commit this during the freeze to fix it:

  --- a/mk/
  +++ b/mk/
  @@ -220,9 +220,9 @@ ${_SUBST_COOKIE.${class}}:
                  [ "$$found_any,${SUBST_NOOP_OK.${class}:tl}" = no,no ] && { \
                          noop_count="$$noop_count+";                     \
                          noop_patterns="$$noop_patterns$$noop_sep$$pattern"; \
                          noop_sep=" ";                                   \
  -               };                                                      \
  +               } || ${TRUE};                                           \
          done;                                                           \
          case $$noop_count in                                            \
          ('')    ;;                                                      \

Ok?  I'm slightly wary that I appear to be the only person seeing this
as it's pretty spectacular breakage, so hence wondering if it's a
pdksh nuance, but I at least don't see that there's any harm in adding
this in lieu of a better-understood fix.


Jonathan Perkin  -  Joyent, Inc.  -

Home | Main Index | Thread Index | Old Index