> Le 9 janv. 2022 à 18:40, john <jra...@ceridwen.us> a écrit : > > > >> On Jan 9, 2022, at 4:51 AM, Pascal <p....@orange.fr> wrote: >> >> Hello, >> >> When building: >> >> % sh gtk-osx-setup.sh >> % PATH=.new_local/bin:$PATH >> >> % jhbuild bootstrap-gtk-osx >> % jhbuild build pygments >> % jhbuild build meta-gtk-osx-bootstrap >> >> An error occurs: ninja is not found. >> >> It happens that .new_local/bin is not appended to PATH before running the >> original jhbuild. >> Thus I propose to add it when creating local jhbuild: >> >> --- ./gtk-osx-setup.sh.0 2022-01-04 21:43:05.000000000 +0100 >> +++ ./gtk-osx-setup.sh 2022-01-09 13:33:04.000000000 +0100 >> @@ -188,7 +188,7 @@ >> export PIPENV_PIPFILE="$DEVPREFIX/etc/Pipfile" >> export PYENV_ROOT="$PYENV_ROOT" >> export PYENV_VERSION="$PYENV_VERSION" >> -export PATH="$PYENV_ROOT/shims:$PATH" >> +export PATH="$PYENV_ROOT/shims:$DEVPREFIX/bin:$PATH" >> export CARGO_HOME="$CARGO_HOME" >> export RUSTUP_HOME="$RUSTUP_HOME" >> export WORKON_HOME="$WORKON_HOME" >> >> What is your feedback? >> > > Instead of > > PATH=.new_local/bin:$PATH > > you need to say > > export PATH="$HOME/.new_local/bin:$PATH" > > otherwise it has effect for only that line. > > Adding the path export to $DEVPREFIX/bin/jhbuild would require invoking > jhbuild with ~/.new_local/bin/jhbuild because it's not on the path. I think > it's better to have the user set the path in their shell rc file. I think > install scripts like Rust's that do that for the user are annoying. That's > why gtk-osx-setup.sh issues a warning instead of adding it.
Hello John, Fully agreed. I don't really like when my shell rc files are automatically modified like Rust install did. Rust install added a shell script to add the rust compiler location to PATH, that is in our case: $DEVPREFIX/bin. Thus an extra option has been added to prevent it: https://github.com/jralls/gtk-osx-build/commit/99fec075c1417bca5e814e8bd0d19e873143f6b2#diff-4ea81385fdbe38d9a30830cbec97fc6ce49505903123c2bd9aa9d91cc9b4a161R151 I notice that shell rc files aren't anymore modified, perfect. Thus, as now Rust install doesn't add it to PATH and if you haven't done before on command line or in your shell rc files then it is not taken in account when building PATH for jhbuild script: https://github.com/jralls/gtk-osx-build/blob/master/gtk-osx-setup.sh#L191 Even setting PATH after executing gtk-osx-setup.sh, I got: % PATH=/usr/local/src-2021/.new_local/bin:$PATH % which ninja /usr/local/src-2021/.new_local/bin/ninja % jhbuild shell Loading .env environment variables... Prefix: /usr/local/xnadalib-2021 Entered jhbuild shell, type 'exit' to return. Restored session: Sun Jan 16 12:22:17 CET 2022 [JH] % which ninja ninja not found How to get a good PATH setting with jhbuild on a fresh session? Thanks, Pascal. https://blady.pagesperso-orange.fr _______________________________________________ gtk-osx-users-list mailing list gtk-osx-users-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list