PERFORCE change 111134 for review

soc-andrew soc-andrew at FreeBSD.org
Tue Dec 5 02:09:17 PST 2006


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

Change 111134 by soc-andrew at soc-andrew_serv on 2006/12/05 10:08:55

	Add a UI to select where to get the distfiles from
	Uase the new Fetch library to get the distfiles

Affected files ...

.. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/500_install_os.lua#12 edit
.. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/Installation.lua#3 edit
.. //depot/projects/soc2005/bsdinstaller/src/libexec/bsdinstaller/inst/429_dist_location.lua#1 add
.. //depot/projects/soc2005/bsdinstaller/src/libexec/bsdinstaller/inst/Makefile#9 edit

Differences ...

==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/500_install_os.lua#12 (text+ko) ====

@@ -10,8 +10,6 @@
 -- 5) clean up
 --
 
-local POSIX = require("posix")
-
 id = "install_os"
 name = _("Install OS")
 req_state = { "storage", "sel_disk", "sel_part", "sel_pkgs" }
@@ -88,17 +86,19 @@
 
     --- Install the kernel(s)
     install_kernel = function(n, kernel)
-    	cmds:add {
+	local file = App.fetcher:get_file(cmds, "kernels/" .. kernel ..
+	".tgz")
+	cmds:add {
 		cmdline = "${root}${TAR} -x " ..
-		    "-f ${root}usr/${uname}/kernels/${kernel}.tgz " ..
+		    "-f ${root}${file} " ..
 		    "-C ${root}${base}/boot",
 		replacements = {
 		    base = base,
-		    kernel = kernel,
-		    uname = POSIX.uname("%r")
+		    file = file
 		}
 	    }
     end
+
     table.foreach(App.conf.kernels, install_kernel)
 
     cmds:add {
@@ -111,15 +111,16 @@
 
     --- Install the ports tree
     if App.conf.install_ports == true then
-		cmds:add{
-		    cmdline = "${root}${TAR} -x " ..
-			"-f ${root}usr/${uname}/ports/ports.tgz "..
-			"-C ${root}${base}/usr",
-		    replacements = {
-			base = base,
-			uname = POSIX.uname("%r")
-		    }
-		}
+	local file = App.fetcher:get_file(cmds, "ports/ports.tgz")
+	cmds:add{
+	    cmdline = "${root}${TAR} -x " ..
+		"-f ${root}${file} "..
+		"-C ${root}${base}/usr",
+	    replacements = {
+		base = base,
+		file = file
+	    }
+	}
     end
 
     --

==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/Installation.lua#3 (text+ko) ====

@@ -422,21 +422,21 @@
 	elseif App.conf.use_tar then
 		add_copy_command = function(src, dest)
 			if (string.sub(src, 0, 1) == "s") then
-				dir = "src"
+				dir = "src/"
 			else
-				dir = src
+				dir = src .. "/"
 			end
+			local file = App.fetcher:get_file(cmds, dir .. src ..
+			    "." .. App.conf.dist_suffix)
 			cmds:add{
 			    cmdline = "${root}${TAR} -f " ..
-				"${root}usr/${uname}/${dir}/${src}.${dist_suffix}" ..
+				"${root}${file}" ..
 				" -x -C ${root}${base}${dest}",
 			    replacements = {
 				base = base,
 				src  = src,
-				dir = dir,
 				dest = dest,
-				dist_suffix = App.conf.dist_suffix,
-				uname = POSIX.uname("%r")
+				file = file
 			    },
 			    log_mode = CmdChain.LOG_QUIET -- don't spam log
 			}

==== //depot/projects/soc2005/bsdinstaller/src/libexec/bsdinstaller/inst/Makefile#9 (text+ko) ====

@@ -10,7 +10,8 @@
 		900_reboot.lua main.lua
 
 # Local scripts
-FILES+=		430_select_dists.lua 432_kernel.lua 435_ports.lua
+FILES+=		429_dist_location.lua 430_select_dists.lua 432_kernel.lua \
+		435_ports.lua
 
 FILESDIR=       ${INST_DIR}/install
 


More information about the p4-projects mailing list