Hi, got distracted by some strange driver problem, maybe this is more fun and useful.
Am Thu, 06 Jun 2013 13:27:06 +0900 schrieb Arnaud Fontaine <[email protected]>: > About https://awesome.naquadah.org/wiki/Awesome-3-git-debian, there > is a missing sudo for ldconfig thanks > it's not clear to me why you need to manually do cmake and so on? right, this is just because of incompetence and learning purposes. please correct my style. As cmake is new to me I this was the easiest way to specify /usr and /etc as targets. cmake -DCMAKE_PREFIX_PATH=/usr -DSYSCONFDIR=/etc AFAICS another way I see is to edit config.h directly and run make #define AWESOME_LUA_LIB_PATH "/usr/share/awesome/lib" #define XDG_CONFIG_DIR "/usr/etc/xdg" Or even shorter just do 'sudo make install', but I think it's good habit to avoid making as root, even if I trust these tools and the code. Am Thu, 06 Jun 2013 13:45:52 +0200 schrieb Uli Schlachter <[email protected]>: > 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. Maybe it is better to just inform the user if any of the deprecated terms are present in the config and to be kind propose replacments. WARN: "require('awful')" should be "awful = require('awful')" WARN: "add_signal" should be "connect_signal" WARN: "remove_signal" should be "disconnect_signal" ... Optionally a new version can be written with simple rules applied. If you don't like the idea to do it during installation, this feature could be added to the 'awesome --check' functiality which currently does not complain when 'awesome.add_signal' is used for example. > So I don't think this is a good idea, but of course you can prove me > otherwise and write patches. I will if there is spare time. > >> 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? Not in my case, hence I saw the above error. > Also, your snippet should use sed -i (in place) instead of writing to > a temporary file. do sed -i.old -r "$pattern" $AWCONF # looks truly more elegant However if awesome checks the config no sed is needing anyway. > 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. - if(lua_pcall(globalconf.L, 0, LUA_MULTRET, 0)) + /* Move error handling function before function */ + lua_pushcfunction(globalconf.L, luaA_dofunction_on_error); + lua_insert(globalconf.L, -2); + if(lua_pcall(globalconf.L, 0, LUA_MULTRET, -2)) If I get it right, your commit adds a warning when parsing the config failes on runtime. Do you think it's a good start to use this for warnings on deprecated terms? http://git.naquadah.org/?p=awesome.git;a=blobdiff;f=luaa.c;h=7c94dac0d247657c815aafa97632853157e4db57;hp=d484172310dc0a1fdd40473507d4bcd3a3435018;hb=3739aabda1323dc488c5150aed166e2fd37edf56;hpb=3f259d0ed2469eb4bfea565628e38138c9c1c06f Thanks for advices how to help best. kardan -- To unsubscribe, send mail to [email protected].
