Hi,

On 06.06.2013 05:42, kardan wrote:
[...]
Regarding the config changes I wonder what could be a proper solution
to deal with this in the future. Maybe it is possible to break down all
changes to patches that are applied to during package installation.

You mean changes to the default config? Those are already available as patches from git:

  $ git log --reverse -p v3.4..v3.5 awesomerc.lua.in

There were 35 patches that modify the default config between 3.4 and 3.5.

However, applying these patches during installation doesn't sound good to me. It could only mess with the current user (during installation, that is likely root) and the changes of these patches applying without problems are quite low.

So I don't think this is a good idea, but of course you can prove me otherwise and write patches.

attempt to call field 'add_signal' (a nil value)
E: awesome: main:524: couldn't find any rc file
For this specific case i put an one-liner to the config update notes
[5], but I am quite sure there are more elegant ways. Maybe it is
possible to automate this for users?

export AWCONF=/etc/xdg/awesome/rc.lua; \
for pattern in 's/add_signal/connect_signal/' \
's/remove_signal/disconnect_signal/' \
's/^require\("(naughty|beautiful|awful)"\)/\1 = \0/'; \
do sed -r "$pattern" < $AWCONF > $AWCONF.new;done

Uhm, what? Why do you need to patch the default config? Shouldn't "make install" overwrite this file with the current version anyway?

Also, your snippet should use sed -i (in place) instead of writing to a temporary file.

Finally, something like this cannot work in general. Users can always come up with ways to break this (e.g. by breaking up your config into multiple files). And if this snippet fails, it can result in a quite broken config in which the owner wouldn't find his way around anymore. I don't really like that.

Cheers,
Uli

--
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.

Reply via email to