From owner-p4-projects@FreeBSD.ORG Tue Dec 5 10:09:17 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6EFC016A416; Tue, 5 Dec 2006 10:09:17 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33FDA16A407 for ; Tue, 5 Dec 2006 10:09:17 +0000 (UTC) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 925EB43CA2 for ; Tue, 5 Dec 2006 10:08:38 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kB5A9GDn025200 for ; Tue, 5 Dec 2006 10:09:16 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kB5A9GFY025197 for perforce@freebsd.org; Tue, 5 Dec 2006 10:09:16 GMT (envelope-from soc-andrew@freebsd.org) Date: Tue, 5 Dec 2006 10:09:16 GMT Message-Id: <200612051009.kB5A9GFY025197@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 111134 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2006 10:09:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=111134 Change 111134 by soc-andrew@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