add clean_dir function, use it to try to empty install dir if removing it fails#4932
Merged
boegel merged 13 commits intoeasybuilders:developfrom Sep 8, 2025
Merged
add clean_dir function, use it to try to empty install dir if removing it fails#4932boegel merged 13 commits intoeasybuilders:developfrom
clean_dir function, use it to try to empty install dir if removing it fails#4932boegel merged 13 commits intoeasybuilders:developfrom
Conversation
added 2 commits
June 21, 2025 14:58
added 2 commits
June 26, 2025 13:12
Member
|
@smoors As discussed during today's conf call, it probably makes sense to introduce another function ( |
boegel
requested changes
Aug 27, 2025
added 2 commits
August 30, 2025 20:43
boegel
requested changes
Sep 3, 2025
boegel
reviewed
Sep 3, 2025
Comment on lines
+1252
to
+1258
| if clean_instead_of_remove: | ||
| # clean the installation directory: first try to remove it; if that fails, empty it | ||
| clean_dir(dir_name) | ||
| self.log.info(f"Cleaned old directory {dir_name}") | ||
| else: | ||
| remove_dir(dir_name) | ||
| self.log.info(f"Removed old directory {dir_name}") |
Member
There was a problem hiding this comment.
shouldn't this whole block be under an if clean:?
Contributor
Author
There was a problem hiding this comment.
no, only the last else block can go under if clean (although not strictly necessary). if clean_instead_of_remove, we should always clean it.
clean_dir function, use it to try to empty install dir if removing it fails
This was referenced Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
required for installing in bwrap namespace, see also #4110
if install dir is bind mounted, it cannot be removed