aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall/dist.c
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1997-03-10 21:11:57 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1997-03-10 21:11:57 +0000
commit628febdfb70720f466d0f48e6c08bf4befbcbe55 (patch)
tree075c2e3bb458401ad909c3bc00f74b5d9de57ac7 /usr.sbin/sysinstall/dist.c
parent930bb1a4da5df36487ac972c12c7ce1ad13c2e7a (diff)
downloadsrc-628febdfb70720f466d0f48e6c08bf4befbcbe55.tar.gz
src-628febdfb70720f466d0f48e6c08bf4befbcbe55.zip
Sync with 2.2.
Notes
Notes: svn path=/head/; revision=23629
Diffstat (limited to 'usr.sbin/sysinstall/dist.c')
-rw-r--r--usr.sbin/sysinstall/dist.c35
1 files changed, 28 insertions, 7 deletions
diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c
index f05b3f7dbd02..acecddccd19b 100644
--- a/usr.sbin/sysinstall/dist.c
+++ b/usr.sbin/sysinstall/dist.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: dist.c,v 1.99 1997/02/22 14:11:31 peter Exp $
+ * $Id: dist.c,v 1.100 1997/03/08 12:57:41 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -175,6 +175,7 @@ static Distribution XF86FontDistTable[] = {
};
static int distMaybeSetDES(dialogMenuItem *self);
+static int distMaybeSetPorts(dialogMenuItem *self);
int
distReset(dialogMenuItem *self)
@@ -194,7 +195,7 @@ distSetDeveloper(dialogMenuItem *self)
distReset(NULL);
Dists = _DIST_DEVELOPER;
SrcDists = DIST_SRC_ALL;
- return distMaybeSetDES(self);
+ return distMaybeSetDES(self) | distMaybeSetPorts(self);
}
int
@@ -206,7 +207,7 @@ distSetXDeveloper(dialogMenuItem *self)
XF86Dists = DIST_XF86_BIN | DIST_COMPAT21 | DIST_XF86_SET | DIST_XF86_CFG | DIST_XF86_LIB | DIST_XF86_PROG | DIST_XF86_MAN | DIST_XF86_SERVER | DIST_XF86_FONTS;
XF86ServerDists = DIST_XF86_SERVER_SVGA | DIST_XF86_SERVER_VGA16;
XF86FontDists = DIST_XF86_FONTS_MISC;
- return distSetXF86(NULL) | distMaybeSetDES(self);
+ return distSetXF86(NULL) | distMaybeSetDES(self) | distMaybeSetPorts(self);
}
int
@@ -215,7 +216,7 @@ distSetKernDeveloper(dialogMenuItem *self)
distReset(NULL);
Dists = _DIST_DEVELOPER;
SrcDists = DIST_SRC_SYS;
- return distMaybeSetDES(self);
+ return distMaybeSetDES(self) | distMaybeSetPorts(self);
}
int
@@ -223,7 +224,7 @@ distSetUser(dialogMenuItem *self)
{
distReset(NULL);
Dists = _DIST_USER;
- return distMaybeSetDES(self);
+ return distMaybeSetDES(self) | distMaybeSetPorts(self);
}
int
@@ -234,7 +235,7 @@ distSetXUser(dialogMenuItem *self)
XF86Dists = DIST_XF86_BIN | DIST_COMPAT21 | DIST_XF86_SET | DIST_XF86_CFG | DIST_XF86_LIB | DIST_XF86_MAN | DIST_XF86_SERVER | DIST_XF86_FONTS;
XF86ServerDists = DIST_XF86_SERVER_SVGA | DIST_XF86_SERVER_VGA16;
XF86FontDists = DIST_XF86_FONTS_MISC;
- return distSetXF86(NULL) | distMaybeSetDES(self);
+ return distSetXF86(NULL) | distMaybeSetDES(self) | distMaybeSetPorts(self);
}
int
@@ -253,7 +254,7 @@ distSetEverything(dialogMenuItem *self)
XF86Dists = DIST_XF86_ALL;
XF86ServerDists = DIST_XF86_SERVER_ALL;
XF86FontDists = DIST_XF86_FONTS_ALL;
- return distMaybeSetDES(self);
+ return distMaybeSetDES(self) | distMaybeSetPorts(self);
}
int
@@ -305,6 +306,26 @@ distMaybeSetDES(dialogMenuItem *self)
return i | DITEM_RECREATE;
}
+static int
+distMaybeSetPorts(dialogMenuItem *self)
+{
+ dialog_clear_norefresh();
+ if (!msgYesNo("Would you like to install the FreeBSD ports collection?\n\n"
+ "This will give you ready access to over 800 ported software\n"
+ "packages, though at the cost of around 35MB of space when \"clean\"\n"
+ "and possibly much more than that if a lot of the distribution tarballs\n"
+ "are loaded (unless you have the 2nd CD from a FreeBSD CDROM distribution\n"
+ "available and can mount it on /cdrom, of course, in which case this is far\n"
+ "less of a problem).\n\n"
+ "The ports collection is a very valuable resource and, if you have at least\n"
+ "100MB to spare in your /usr partition, well worth having around.\n\n"
+ "For more information on the ports collection, see http://www.freebsd.org/ports\n"))
+ Dists |= DIST_PORTS;
+ else
+ Dists &= ~DIST_PORTS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
+}
+
int
distSetSrc(dialogMenuItem *self)
{