OpenWrt Forum Archive

Topic: Diff on different versions of .config file

The content of this topic has been archived on 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

on Freifunk Oldenburg we use to build our stable firmware on fixed revisions of openwrt with a fixed .config file which we commit to our repository. Some days ago we released our latest stable firmware and want to update the openwrt revision now to prepare for our upcomming firmware relase. But preparing a new .config file based on a newer openwrt revision is kind of tricky because the lines in the file  are in a completely different order after executing make menuconfig. Seems like there are a lot of changes to the file between each revision.

We had this problem before but didnĀ“t care. Now we want to execute a diff on both version of the .config file to see if the buildroot disabled some options we need or enabled some options we dont need but the whole thing is totaly scrambled and reading the diff seems to be a job that cant be done by humans.

Is there some trigger or something like that we missed so that the buildroot puts the options in the .config file always in the same order so that a diff on different versions would be possible and readyble by humans? Or is there any other way we can accomplish this goal?

Kind regards
Floh1111

You might compare the output of scripts/diffconfig.sh
That only displays "your changes" to the plain default.

But you are right, items in .config are not in stable order. You might also first "sort" .config and then compare the two versions.

I don't think there is an option for that.

But how about tossing the # lines and sorting it? then diffing it should work.
sed 's/#.*$//;/^$/d' .config | sort > .config2

edit: should have pressed submit a bit faster tongue

(Last edited by FriedZombie on 22 Oct 2013, 22:23)

Okay sorting would be a way to do it.

Thank You!
Floh1111

The discussion might have continued from here.