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

fix: tarball builder #341

Merged
merged 2 commits into from
Nov 22, 2023
Merged

fix: tarball builder #341

merged 2 commits into from
Nov 22, 2023

Conversation

terlar
Copy link
Contributor

@terlar terlar commented Nov 22, 2023

This fixes the tarball builder when trying to remove /var/empty and environments where HOME variable is set.

See #337 and #338

@nzbr nzbr merged commit a9287f7 into nix-community:main Nov 22, 2023
19 checks passed
@terlar terlar deleted the fix-tarball-builder branch November 22, 2023 15:14
@@ -56,7 +56,7 @@ in

root=$(mktemp -p "''${TMPDIR:-/tmp}" -d nixos-wsl-tarball.XXXXXXXXXX)
# FIXME: fails in CI for some reason, but we don't really care because it's CI
trap 'rm -rf "$root" || true' INT TERM EXIT
trap 'chattr -Rf -i "$root" || true && rm -rf "$root" || true' INT TERM EXIT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is doing what you thought it would do

Suggested change
trap 'chattr -Rf -i "$root" || true && rm -rf "$root" || true' INT TERM EXIT
trap 'chattr -Rf -i "$root"; rm -rf "$root"; true' INT TERM EXIT

we probably want something like the above

@nzbr nzbr changed the title Fix tarball builder fix: tarball builder Dec 15, 2023
@nzbr nzbr added the bug Something isn't working label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants