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

make install overwrites user's local modifications #8

Open
morgant opened this issue Jul 28, 2023 · 2 comments
Open

make install overwrites user's local modifications #8

morgant opened this issue Jul 28, 2023 · 2 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@morgant
Copy link
Owner

morgant commented Jul 28, 2023

While the Makefile has seen improvements lately, one major issue is that make install overwrites the user's ~/.mlvwm/ contents, so any local modifications are lost. Since ~/.mlvwmrc is symlinked to ~/.mlvwm/.mlvwmrc, this means that even some basic settings like preferred theme will be reset. Worse, since "Apple" menu items need to be added to the selected ~/.mlvwm/themes/ file, those items will also be lost.

@morgant morgant added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Jul 28, 2023
@morgant morgant self-assigned this Jul 28, 2023
@morgant
Copy link
Owner Author

morgant commented Jul 28, 2023

My initial thoughts for this are:

  1. Using rsync to back up any existing ~/.mlvwm/ directory to a date-stamped ~/.mlvwm-$(date +%Y%m%d-%H%M%S) directory before installing, then using rsync to install directories to ~/.mlvwm/. Naturally, that adds rsync as a prerequisite.
  2. Perform a recursive diff against files & directories in ~/.mlvwm/ so that it warns if any files differ, but I'd assume that most files will differ because of updates to this repository.
  3. Splitting some configuration (like the entirety of the "Apple" menu) out into separate files so that they can be more easily modified, then also testing to see if user modifications can be Read in after the defaults to override prior settings from defaults.

Any other thoughts are welcome.

morgant added a commit that referenced this issue May 7, 2024
…arget files to a timestamped backup before performing installing. This fixes Issue #13 by removing the non-portable install(1) '-B' option, plus partially addresses Issue #8 by not overwriting the user's .mlvwm directory contents (though they'd still have to diff & restore any modifications manually).
@morgant
Copy link
Owner Author

morgant commented May 7, 2024

While fixing Issue #13, I updated the Makefile 'install' target to find & mv the $HOME/.mlvwm directory to a timestamped backup to prevent overwriting.

That's a start, but the user will still need to manually compare and re-apply modifications, so not ideal. Also, make install doesn't warn the user that this is the case and neither does the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant