libelektra
libelektra copied to clipboard
kdb set uses default: on cascading writes
Steps to Reproduce the Problem
kdb meta-set "spec:/sw/redshift/#0/current/mode" default continual
kdb set "/sw/redshift/#0/current/mode" print
kdb get "/sw/redshift/#0/current/mode"
Expected Result
That the second command fails because the default: namespace is not writable.
Actual Result
kdb set "/sw/redshift/#0/current/mode" print
#> Set string to "print"
#> Using name default:/sw/redshift/#0/current/mode
kdb get "/sw/redshift/#0/current/mode"
#> continual
System Information
- Elektra Version: master
Further Information
- A similar problem will probably exist for other temporary namespaces like proc:.
- meta-set, rm and other write commands are also affected.
@dev2718 do you have time to take a look? What behavior would you suggest?
@markus2330 I also noticed this today while working on #4029 and wanted to report this. But you were faster :)!
I am a bit confused as to how to reproduce this, as
kdb set spec:/sw/redshift/#0/current/mode default continual
raises a syntax error (too may parameters).
Which shell do you use? Some shells interpret # also in the middle of words. I quoted the top-post so that the problem should not occur.
I use fish, but this is not the problem.
kdb set "spec:/sw/redshift/#0/current/mode" default continual
gives me
Sorry, I could not process the arguments: 2 arguments needed
caused by
https://github.com/ElektraInitiative/libelektra/blob/90fb5bef6bf2c899d8b90af90d08b99140ae6666/src/tools/kdb/set.cpp#L27-L30
Sorry, it should read meta-set instead of set, I updated the top description!
As discussed, we will disable all cascading writes.
@atmaxinger here is the question if you rewrite the tooling so that this bug get fixed.
I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping by writing a message here or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:
I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart: