PERFORCE change 86454 for review

soc-andrew soc-andrew at FreeBSD.org
Tue Nov 8 03:08:42 PST 2005


http://perforce.freebsd.org/chv.cgi?CH=86454

Change 86454 by soc-andrew at soc-andrew_serv on 2005/11/08 11:08:28

	Merge all the source dists to a generic source option

Affected files ...

.. //depot/projects/soc2005/bsdinstaller/src/libexec/bsdinstaller/conf/FreeBSD.lua#4 edit
.. //depot/projects/soc2005/bsdinstaller/src/libexec/bsdinstaller/inst/430_select_dists.lua#2 edit

Differences ...

==== //depot/projects/soc2005/bsdinstaller/src/libexec/bsdinstaller/conf/FreeBSD.lua#4 (text+ko) ====

@@ -27,26 +27,30 @@
 	{ src = "compat22", dest = "/", install = "Y" },
 	{ src = "compat3x", dest = "/", install = "Y" },
 	{ src = "compat4x", dest = "/", install = "Y" },
-	{ src = "sbase", dest = "/usr/src", install = "Y" },
-	{ src = "scrypto", dest = "/usr/src", install = "Y" },
-	{ src = "setc", dest = "/usr/src", install = "Y" },
-	{ src = "sgames", dest = "/usr/src", install = "Y" },
-	{ src = "sbin", dest = "/usr/src", install = "Y" },
-	{ src = "scontrib", dest = "/usr/src", install = "Y" },
-	{ src = "skrb5", dest = "/usr/src", install = "Y" },
-	{ src = "slib", dest = "/usr/src", install = "Y" },
-	{ src = "slibexec", dest = "/usr/src", install = "Y" },
-	{ src = "sgnu", dest = "/usr/src", install = "Y" },
-	{ src = "sinclude", dest = "/usr/src", install = "Y" },
-	{ src = "ssbin", dest = "/usr/src", install = "Y" },
-	{ src = "ssecure", dest = "/usr/src", install = "Y" },
-	{ src = "sshare", dest = "/usr/src", install = "Y" },
-	{ src = "srelease", dest = "/usr/src", install = "Y" },
-	{ src = "srescue", dest = "/usr/src", install = "Y" },
-	{ src = "subin", dest = "/usr/src", install = "Y" },
-	{ src = "susbin", dest = "/usr/src", install = "Y" },
-	{ src = "ssys", dest = "/usr/src", install = "Y" },
-	{ src = "stools", dest = "/usr/src", install = "Y" }
+	{ src = "source", dest = "/usr/src", install = "Y" }
+}
+
+source_items = {
+	"sbase",
+	"scrypto",
+	"setc",
+	"sgames",
+	"sbin",
+	"scontrib",
+	"skrb5",
+	"slib",
+	"slibexec",
+	"sgnu",
+	"sinclude",
+	"ssbin",
+	"ssecure",
+	"sshare",
+	"srelease",
+	"srescue",
+	"subin",
+	"susbin",
+	"ssys",
+	"stools"
 }
 
 cmd_names = cmd_names + {

==== //depot/projects/soc2005/bsdinstaller/src/libexec/bsdinstaller/inst/430_select_dists.lua#2 (text+ko) ====

@@ -57,26 +57,41 @@
 			end
 		end
 
+		insert_source = function(table_source, table_new)
+			for item in table_source do
+				table.insert(table_new, {
+				    src = table_source[item],
+				    dest = "/usr/src"
+				})
+			end
+		end
+
 		insert_item = function(tab_new, tab_orig, value)
 			for item in tab_orig do
 				if tab_orig[item].src == value then
 					table.insert(tab_new, {
-						src = tab_orig[item].src,
-						dest = tab_orig[item].dest })
+					    src = tab_orig[item].src,
+					    dest = tab_orig[item].dest
+					})
 				end
 			end
-
 		end
 
 		App.conf.install_items = {}
+		-- Populate App.conf.install_items with the dists to install
 		for data in response.datasets do
 			if response.datasets[data].install ~= "Y" then
 				remove_item(App.conf.install_items_orig,
 				    response.datasets[data].dist)
 			else
-				insert_item(App.conf.install_items,
-				    App.conf.install_items_orig,
-				    response.datasets[data].dist)
+				if response.datasets[data].dist == "source" then
+					insert_source(App.conf.source_items,
+					    App.conf.install_items)
+				else
+					insert_item(App.conf.install_items,
+					    App.conf.install_items_orig,
+					    response.datasets[data].dist)
+				end
 			end
 		end
 		return step:next()


More information about the p4-projects mailing list