Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime environments being split across multiple lines #902

Closed
jhheider opened this issue Dec 22, 2023 · 2 comments
Closed

runtime environments being split across multiple lines #902

jhheider opened this issue Dec 22, 2023 · 2 comments

Comments

@jhheider
Copy link
Contributor

jhheider commented Dec 22, 2023

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.

@mxcl
Copy link
Member

mxcl commented Dec 22, 2023

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.

@mxcl
Copy link
Member

mxcl commented Dec 22, 2023

this is a regression.

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

mxcl added a commit that referenced this issue Dec 22, 2023
@mxcl mxcl closed this as completed in a60adf0 Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants