h2t: protect host cfg - #4090
Closed
h8d13 wants to merge 2 commits into
Closed
Conversation
svartkanin
approved these changes
Jan 7, 2026
svartkanin
requested changes
Jan 7, 2026
svartkanin
reviewed
Jan 9, 2026
| # Apply temp using backup then revert on exit handler | ||
| if running_from_host(): | ||
| temp_copy = self._config_path.with_suffix('.bak') | ||
| copy2(self._config_path, temp_copy) |
Collaborator
There was a problem hiding this comment.
Every time you're running this apply function you will copy the pacman.conf file, which means if you run it 2 times, it will override the first backup file.
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.
Still on my spree of testing directly from one install to another.
This a simple patch to not write into a host
pacman.confprevents from accidentally modifying the host's/etcwhen usingCustom Repositoriessection in the menu but persists on target regardless