-
Notifications
You must be signed in to change notification settings - Fork 486
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
Handle site palette configuration better #3805
Comments
Can be complicated if the files in question are changed by an O update installation? Then any method has to walk through both versions and try to implement the changes in the user's file(s) and also detect what differences affect the SE settings and what's a O update change. But if so the need for future SE-palette updates are gone. :) |
This is a classic problem. The simple approach is to merge upstream changes with the local ones. There are tools for that, including GUI ones like meld (it's basically the same problem as merging git branches.). That said, it can probably not be automated, and perhaps better done using some xml-aware merge tool if there are such beasts out there. Anyway, if user uses a modified file it's her responsibility to maintain it. A change like this would just make sure that no user files are lost in an update. |
That's why the manual note "Save the extracted files for possible future O update". |
You actually need three versions of the file to handle an update:
With these you can set up a 3-way merge. It's basically about applying the diff between 3) and 1) to 2). It will always be manual. If we store 3) in another location where it also actually is used this one is OK. 1) and 2) can be maintained automatically by OpenCPN installation scripts. Don't forget that modifying files under .../S57 is more or less impossible on Linux. While "possible" on Windows and MacOS it's still a bad practice. It's just that it's the only thing which works right now. |
Yes, everything can be solved by logic if needed? |
Not simple but broken. That the installation isn't write protected is a major flaw leading to this mess. ;) |
Is your feature request related to a problem?
Some users for example Swedes like me wants to use a site-specific chart palette. This is described in the user manual.
However, the method described means that this configuration is lost on an OpenCPN update. Not nice.
EDIT: Furthermore, on Debian/Ubuntu it means modifying files under /usr which makes the packaging system extremely upset for good reasons. Flatpak is immutable, so here it's just not possible. Overall, the Linux situation means that this could be seen as a bug rather than an enhancement.
Describe the solution you'd like
A user configured palette should not be affected by an OpenCPN update.
Describe alternatives you've considered
The core change would be that OpenCPN searched in some user and/or site path for the palette files before falling back to the palette which is part of the installation. Actual paths should not be a problem on any platform.
Additional context
Too late for 5.10
The text was updated successfully, but these errors were encountered: