pkgxdev / pkgx

the last thing you’ll install

Home Page:https://pkgx.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

runtime environments being split across multiple lines

jhheider opened this issue · comments

aspell

    ASPELL_CONF: "dict-dir {{ prefix }}/lib/aspell-{{ version.marketing }}; $ASPELL_CONF"
/__w/pantry/pantry/testbeds/aspell.net-0.60.8.1.sh: line 9: /github/home/.pkgx/aspell.net/v0.60.8.1/lib/aspell-0.60: Is a directory

libvips

(from mpi)

    OMPI_FCFLAGS: $FCFLAGS -I{{prefix}}/include
/home/builder/actions-runner/_work/pantry/pantry/builds/libvips.org-8.15.1.sh: line 18: -I/opt/open-mpi.org/v4.1.6/include: No such file or directory

this is a regression.

pkgx +aspell
ASPELL_CONF=dict-dir /Users/mxcl/.pkgx/aspell.net/v0.60.8/lib/aspell-0.60; ${ASPELL_CONF}
PATH=/Users/mxcl/.pkgx/aspell.net/v0.60.8/bin:${PATH}
CPATH=/Users/mxcl/.pkgx/aspell.net/v0.60.8/include:${CPATH}
LIBRARY_PATH=/Users/mxcl/.pkgx/aspell.net/v0.60.8/lib:${LIBRARY_PATH}
XDG_DATA_DIRS=/Users/mxcl/.pkgx/aspell.net/v0.60.8/share:${XDG_DATA_DIRS}
MANPATH=/Users/mxcl/.pkgx/aspell.net/v0.60.8/share/man:${MANPATH}:/usr/share/man
LD_LIBRARY_PATH=/Users/mxcl/.pkgx/aspell.net/v0.60.8/lib:${LD_LIBRARY_PATH}
DYLD_FALLBACK_LIBRARY_PATH=/Users/mxcl/.pkgx/aspell.net/v0.60.8/lib:${DYLD_FALLBACK_LIBRARY_PATH}

No newlines. Brewkit uses env +aspell to add aspell to the env, but locally this works for me. You can see it failing in the build logs though.

/__w/pantry/pantry/testbeds/aspell.net-0.60.8.1.sh: line 9: /github/home/.pkgx/aspell.net/v0.60.8.1/lib/aspell-0.60: Is a directory

Edit: bk build aspell works fine locally too without the same error
Edit: k bk test aspell fails the same

Update

So inside the script here is the way we add aspell to the testbed env:

eval "$(CLICOLOR_FORCE=1 /path/to/pkgx "+aspell.net=0.60.8.1")" || exit $?

Which when run manually gives:

# snip
ASPELL_CONF=dict-dir /Users/mxcl/.pkgx/aspell.net/v0.60.8.1/lib/aspell-0.60; ${ASPELL_CONF}
P

So I don’t see how we are getting newlines here. However the output from pkgx +pkg is not evalable since it would need to be quoted. I guess pkgx +pkg should do that…? I was emulating the output from /usr/bin/env which doesn’t quote but maybe that's a stupid decision.

Conclusion

Either fix pkgx +pkg and officially make it “source-able” or fix brewkit to use a different mechanism for creating the script environments.

this is a regression.

It's a brewkit regression, but pkgx itself has always behaved this way.