Conversation
|
@Chemin1 can you help out here and fix this code to use your API? |
|
I think so but I still have to solve some dependency problems (#20) to compile this repository. |
|
This patch can be applied on this branch elektra-backend-threeway-merge and replaces the old merge tool with the new merge library. Unfortunately, this is not tested in any way as I am still unable to compile kconfig #22. |
|
@FelixResch please try not to keep important PRs open too long as this hinders others to successfully work with the master of this repo. What is the status here? Can you please rebase? |
1e8d223 to
2119d81
Compare
|
I have now rebased the branch on upstream/master and applied @Chemin1's patch. I had to change the root key in some places, but now it works. (At least my test runs successfully) I just have one question: The problem was, that when any keySet for the merge is given with a name space, but the corresponding root key does not contain any namespace, the namespace is added to the name of the keys, after resultRoot and before the rest of the key name. I think this happens, because the method used for removing the root only removes the name of the root key and leaves the namespace in, if the root does not contain one. Is this desired behavior? |
|
Cool! 🎆 About the question: can you give an example or even test case for this behavior? |
|
A simple example: Assume mergeKey to be When I change the roots, to contain the same namespace as the respective key set, the merge works as expected. I expected the merge to handle namespaces transparently. Is it expected behavior that effectively only merges with explicit namespaces are possible? Even then I wouldn't expect the namespace to appear in the middle of the key name... |
|
This sounds very much like a bug for me. In the merged keyset there never should be a key name which was neither in our, theirs or base before. @Chemin1 can you please look at cascading merges? As workaround I would for now use only keys of user/, which used to be the default behavior of KDE anyway (copying system config to user config and then only operate on user configs). |
IIRC, that is what I had in mind when initially (that was when I had 0 knowledge about namespaces) wrote this. The root should sort of indicate where the merge starts. Please try something like this: If you have a KeySet containing to set rootKey to |
|
Thank you for the tip but we should also fix the issue with cascading keys as root key.See ElektraInitiative/libelektra#2762 and ElektraInitiative/libelektra#1288 why it is important. |
added warning when elektra is enabled and ini backend is used added flag to skip tests which fail on the test machine
moved kdb and keyset to backend instances
Co-Authored-By: markus2330 <markus2330@users.noreply.github.com>
…into elektra-backend-threeway-merge
No description provided.