PERFORCE change 81330 for review
soc-andrew
soc-andrew at FreeBSD.org
Tue Aug 2 11:06:59 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=81330
Change 81330 by soc-andrew at 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, "");
More information about the p4-projects
mailing list