r4141 - dists/trunk/scripts

Simon Horman horms at costa.debian.org
Thu Sep 8 05:55:41 UTC 2005


Author: horms
Date: 2005-09-08 05:55:40 +0000 (Thu, 08 Sep 2005)
New Revision: 4141

Modified:
   dists/trunk/scripts/split-config
Log:
Annotate removed options unless they are removed globally

Modified: dists/trunk/scripts/split-config
===================================================================
--- dists/trunk/scripts/split-config	2005-09-07 08:36:47 UTC (rev 4140)
+++ dists/trunk/scripts/split-config	2005-09-08 05:55:40 UTC (rev 4141)
@@ -25,6 +25,8 @@
 	File.open(file).each { |line|
 		if line =~ /^(CONFIG_\w+)=(.+)$/
 			kconf[$1] = $2
+		elsif line =~ /^\s*#\s*(CONFIG_\w+) is removed\s*$/
+			kconf[$1] = 'XXX'
 		elsif line =~ /^\s*#\s*(CONFIG_\w+) is not set\s*$/
 			kconf[$1] = 'n'
 		end
@@ -35,6 +37,8 @@
 def configline(key, val)
 	if val == 'n'
 		"# #{key} is not set\n"
+	elsif val == 'XXX'
+		"# #{key} is removed\n"
 	else
 		"#{key}=#{val}\n"
 	end
@@ -190,12 +194,17 @@
 end
 
 def remove_option(key, val)
+	return if val == 'XXX'
 	puts "\n#{key}=#{val} has been removed."
 	answer = prompt_user()
 	files = affected_files(answer)
 	files.each { |f|
 		strip_key(f, key)
 	}
+	return if answer == 'g'
+	File.open(files[0], 'a') { |f|
+			f << configline(key, 'XXX')
+	}
 end
 
 def update_option(key, oldval, newval)




More information about the Kernel-svn-changes mailing list