`etc-update` does not work any longer with the `diff_command` for Emacs: diff_command="eval emacs -nw …" This was presumably introduced with commit 2bf62e023956a4ed1adf67d18152aa82b7aa7356 where the sanity check for `$diff_command` was changed (lines 680–681): - if ! type ${diff_command%% *} >/dev/null; then - die "'${diff_command}' does not seem to work, aborting" 1 + if ! cmd_var_is_valid "${diff_command}" ; then + die "'${diff_command}' does not seem to work, aborting" `cmd_var_is_valid` calls `type -P` to determine whether the given `diff_command` points to an executable, which is unsuccessful for the bash-builtin `eval`.
This is fixed in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b344222a9a4dfbd811e196bd755ccbec511d0721
why exactly do you need `eval` ? what you showed does not require evaling, and general diff_command expansion doesn't either.
I assume that he got the eval from the the example in etc-update.conf, by I have no idea why or if it's necessary.
This is fixed in 2.1.10.52 and 2.2.0_alpha96.
Yes, I’ve got the `eval` from the `etc-update.conf` example. I have never bothered to mess around with it since it just worked.
well, i'd like to move past this. how about: - drop the eval from the config file - update etc-update to warn+ignore a single "eval" leading keyword i can't think of any cases where the eval is necessary
While we're at it, we should probably also look fixing the diff_command usage inside do_distconf. I suspect that it may not work correctly with using_editor=1, since emacs doesn't behave like a normal diff command.
The command line in the etc-update.conf example is: diff_command="eval emacs -nw --eval=\'\(ediff\ \"%file1\"\ \"%file2\"\)\'" and it does not work: What should be passed as arguments to emacs is the following (for clarity, no shell quoting and each argument on its own line): -nw --eval (ediff "foo" "bar") What gets passed instead is: -nw --eval='(ediff foo bar)' Not the spurious single quotes and the missing double quotes around the filenames. (The = sign doesn't really matter, although the examples in Emacs' documentation don't have it.) etc-update will work after changing the diff_command to: diff_command="eval emacs -nw --eval \\(ediff\\ \\\"%file1\\\"\\ \\\"%file2\\\"\\)" However, this is somewhat ugly. I haven't found a solution without "eval".