Date: Tue, 2 Aug 2005 11:06:56 GMT From: soc-andrew <soc-andrew@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 81330 for review Message-ID: <200508021106.j72B6unl079614@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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, "");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508021106.j72B6unl079614>