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

Move init.sh creation to before build and tarball unpacking #801

Merged
merged 4 commits into from
Nov 27, 2023

Conversation

TimoWilken
Copy link
Contributor

See also #800.

This changes a minimum of code, only moving the init.sh creation up in the build script.

@TimoWilken TimoWilken requested a review from ktf October 6, 2023 09:24
@ktf
Copy link
Member

ktf commented Oct 6, 2023

Thanks. Indeed environment is simply the creation of the environment file, no?

@TimoWilken
Copy link
Contributor Author

Yes, exactly!

@TimoWilken TimoWilken marked this pull request as draft October 6, 2023 13:54
@TimoWilken
Copy link
Contributor Author

Actually hang on, I think .build-hash should only be created after a successful build since aliBuild checks for it to see if a previous build has completed.

@ktf
Copy link
Member

ktf commented Oct 6, 2023

yes, agreed.

This file is used by aliBuild to determine whether the package was previously
built successfully.
@TimoWilken TimoWilken marked this pull request as ready for review November 15, 2023 14:27
@TimoWilken
Copy link
Contributor Author

Testing this, there's another problem: when a build fails, the .envrc points to sw/<arch>/<package>/<version>/etc/profile.d/init.sh (which would be correct if the build had succeeded), but it should instead point into $INSTALLROOT and only be changed to point to the former path after the build succeeds.

@TimoWilken
Copy link
Contributor Author

TimoWilken commented Nov 15, 2023

One more problem: if the build was done in a Docker container (like all the Linux CI builds are), then the paths will only be valid inside the container (i.e., they'll be under /sw, not /build/nomad/.../ci/local/check/sw).

This was a problem before as well, but I suppose at least the .envrc can be used as a base to copy-paste from, filling in the correct paths instead.

@ktf ktf merged commit 9815107 into alisw:master Nov 27, 2023
11 checks passed
@TimoWilken TimoWilken deleted the early-init.sh-minimal branch November 27, 2023 12:45
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

Successfully merging this pull request may close these issues.

2 participants