From owner-p4-projects@FreeBSD.ORG Tue Aug 2 11:06:59 2005 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 CBE8E16A421; Tue, 2 Aug 2005 11:06:58 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7430716A41F for ; Tue, 2 Aug 2005 11:06:58 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0012B43D4C for ; Tue, 2 Aug 2005 11:06:56 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j72B6uKs079617 for ; Tue, 2 Aug 2005 11:06:56 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j72B6unl079614 for perforce@freebsd.org; Tue, 2 Aug 2005 11:06:56 GMT (envelope-from soc-andrew@freebsd.org) Date: Tue, 2 Aug 2005 11:06:56 GMT Message-Id: <200508021106.j72B6unl079614@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 81330 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, 02 Aug 2005 11:06:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=81330 Change 81330 by soc-andrew@soc-andrew_serv on 2005/08/02 11:06:28 Install the source code when requested to Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/fn_subpart.c#2 edit .. //depot/projects/soc2005/bsdinstaller/src/usr.sbin/bsdinstaller/backend/extra_flow.c#5 edit .. //depot/projects/soc2005/bsdinstaller/src/usr.sbin/bsdinstaller/backend/fn_install_freebsd.c#6 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/installer/fn_subpart.c#2 (text+ko) ==== @@ -305,7 +305,7 @@ case MTPT_SWAP: return(swap); case MTPT_VAR: return(128); case MTPT_TMP: return(128); - case MTPT_USR: return(512); + case MTPT_USR: return(1024); } } else if (capacity < 10240) { switch (mtpt) { ==== //depot/projects/soc2005/bsdinstaller/src/usr.sbin/bsdinstaller/backend/extra_flow.c#5 (text+ko) ==== @@ -51,20 +51,22 @@ const char *desc; }; +/* XXX Dos't hardcode this info here */ /* The top-level distribution categories */ static struct dist DistTable[] = { - { "base", "Base" }, - { "doc", "Documentation" }, - { "games", "Games" }, - { "manpages", "Manual pages" }, - { "catpages", "Cat Pages" }, - { "proflibs", "Profiling Libraries" }, - { "dict", "Dictionaries" }, - { "info", "Info Pages" }, + { "base", "Base" }, + { "doc", "Documentation" }, + { "games", "Games" }, + { "manpages", "Manual pages" }, + { "catpages", "Cat Pages" }, + { "proflibs", "Profiling Libraries" }, + { "dict", "Dictionaries" }, + { "info", "Info Pages" }, #ifdef __amd64__ - { "lib32", "32bit Libraries" }, + { "lib32", "32bit Libraries" }, #endif - { NULL, NULL } + { "src", "Source" }, + { NULL, NULL } }; void ==== //depot/projects/soc2005/bsdinstaller/src/usr.sbin/bsdinstaller/backend/fn_install_freebsd.c#6 (text+ko) ==== @@ -65,6 +65,30 @@ char *mtree_file[] = { "root", "var", "usr", "sendmail", NULL }; char *mtree_dest[] = { "/", "/var", "/usr", "/", NULL }; +static char *SrcDistTable[] = { + "sbase", + "scontrib", + "scrypto", + "sgnu", + "setc", + "sgames", + "sinclude", + "skrb5", + "slib", + "slibexec", + "srelease", + "srescue", + "sbin", + "ssbin", + "ssecure", + "sshare", + "ssys", + "stools", + "subin", + "susbin", + NULL +}; + static int pre_install(struct i_fn_args *); static int do_install(struct i_fn_args *); static int post_install(struct i_fn_args *); @@ -171,6 +195,8 @@ int i; struct commands *cmds; struct utsname name; + int install_src = 0; + uname(&name); snprintf(base, PATH_MAX, "/usr/%s", name.release); @@ -189,12 +215,21 @@ if (rk_len < 32) dist_name[rk_len] = '\0'; - if( dist_extract(a->c, dist_name) != 0) { + if (strncmp("src", dist_name, 4) == 0) { + install_src = 1; + } else if( dist_extract(a->c, dist_name) != 0) { inform(a->c, _("Distribution %s was not installed."), dist_name); return 0; } aura_dict_next(a->dists); } + if (install_src == 1) { + int src_dist = 0; + dist_set_location("/mnt/usr/src"); + for (; SrcDistTable[src_dist] != NULL; src_dist++) { + dist_extract(a->c, SrcDistTable[src_dist]); + } + } i_log(a, ">>> Done"); i_log(a, "");