On Mon, Jun 07, 2010 at 11:13:25AM +0200, Remy Bohmer wrote: > 2010/5/31 Marc Kleine-Budde <[email protected]>: > > Remy Bohmer wrote: > >>> I don't like this. $(KERNEL_CONFIG) may not be readonly on purpose and > >>> changes get lost. What about: > >>> > >>> if diff -q "$(KERNEL_DIR)/.config" "$(<)" > /dev/null; then > >>> cp "$(KERNEL_DIR)/.config" "$(<)" > >>> fi > >>> > >>> Then it only fails if there are changes. > > > > you can also use "cmp -s", which is used in the oldconfig/menuconfig > > > >> This will not work, since it always changes, even if there is not > >> actually made a change at all. > >> It changes because the timestamp at the 4th line in the config file > >> will be updated on every 'make oldconfig' , resulting in that always a > >> difference will be detected. It could only work if a compare is done > >> only on the lines that do not start with '#', like this > > > > The timestamp thing is not true, since ptxdist sets "KCONFIG_NOTIMESTAMP=1" > > The timestamp thing is true for users who still run the menuconfig > from the kernel tree itself. In that case always a timestamp is listed > in the config file, and thus there will always be noticed a > difference. > I still think it is useful to check if the configs are different while > excluding checking for the lines starting with '#' like below. > > >> if diff -q -I '#' "$(KERNEL_DIR)/.config" "$(<)" > /dev/null; then > >> cp "$(KERNEL_DIR)/.config" "$(<)" > >> fi > > shall I provide a new patch for that?
Yes please. mmm, I think it should fail for new disabled options. '-I "# [^C]"' maybe? mol -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list [email protected]
