preserve symlinked .configs
PATCH 1/1 preserve symlinked .configs
When one has several machines it is nice to keep each machine's .config under revision control. Then, on each machine,
ln [-s] .config-$(hostname -s) .config
Problem is, `make menuconfig/oldconfig/config' goes and removes your link, causing much irritation.
scripts/Configure +3 -2
@@ -566,9 +566,10 @@ rm -f .config.old if [ -f .config ]; then - mv .config .config.old + cp .config .config.old fi -mv .tmpconfig .config +cp .tmpconfig .config +rm .tmpconfig mv .tmpconfig.h include/linux/autoconf.h echo
scripts/Menuconfig +4 -4
@@ -1290,12 +1290,12 @@ if [ -f "$DEF_CONFIG" ] then - rm -f ${DEF_CONFIG}.old - mv $DEF_CONFIG ${DEF_CONFIG}.old + cp $DEF_CONFIG ${DEF_CONFIG}.old fi - mv $CONFIG $DEF_CONFIG - + cp $CONFIG $DEF_CONFIG + rm $CONFIG + return 0 else return 1
-
Quoted 8 lines · Andrew Morton
When one has several machines it is nice to keep each machine's .config under revision control. Then, on each machine,
ln [-s] .config-$(hostname -s) .configProblem is, `make menuconfig/oldconfig/config' goes and removes your link, causing much irritation.
IMHO currect behaviour is the Right Thing. Think of 'cp -al' on trees. Patching one does not affect another, because patch() does not modify files, it creates new file. If I use your patch and have 'cp -al'-d trees which happen to have .config inside, doing 'make *config' in one tree will affect another. Thats wrong.
Signature · 1 line
marko