aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1999-05-14 12:15:34 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1999-05-14 12:15:34 +0000
commit13987852414b706a1031c59edf3105bc78d1e4a8 (patch)
tree2826f28bdaa8e8b1db7e6b26277dd8d648fa7b21
parent6c2e3dde8cb3d10e7825d5e2a4ff46d0ab2ba221 (diff)
downloadsrc-13987852414b706a1031c59edf3105bc78d1e4a8.tar.gz
src-13987852414b706a1031c59edf3105bc78d1e4a8.zip
Notes
-rw-r--r--release/sysinstall/index.c10
-rw-r--r--release/sysinstall/package.c20
-rw-r--r--usr.sbin/sysinstall/index.c10
-rw-r--r--usr.sbin/sysinstall/package.c20
4 files changed, 34 insertions, 26 deletions
diff --git a/release/sysinstall/index.c b/release/sysinstall/index.c
index da4c3e9389a4..7eb3ab38972f 100644
--- a/release/sysinstall/index.c
+++ b/release/sysinstall/index.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: index.c,v 1.64 1999/04/06 08:25:52 jkh Exp $
+ * $Id: index.c,v 1.65 1999/05/12 09:02:34 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -70,9 +70,10 @@ _strdup(char *ptr)
static char *descrs[] = {
"Package Selection", "To mark a package, move to it and press SPACE. If the package is\n"
"already marked, it will be unmarked or deleted (if installed).\n"
+ "Items marked with a 'D' are dependencies which will be auto-loaded\n."
"To search for a package by name, press ESC. To select a category,\n"
"press RETURN. NOTE: The All category selection creates a very large\n"
- "submenu. If you select it, please be patient while it comes up.",
+ "submenu! If you select it, please be patient while it comes up.",
"Package Targets", "These are the packages you've selected for extraction.\n\n"
"If you're sure of these choices, select OK.\n"
"If not, select Cancel to go back to the package selection menu.\n",
@@ -626,8 +627,9 @@ index_extract(Device *dev, PkgNodePtr top, PkgNodePtr plist)
int status = DITEM_SUCCESS;
for (tmp = plist->kids; tmp && tmp->name; tmp = tmp->next)
- status |= index_extract_one(dev, top, tmp, FALSE);
- return status;
+ if (DITEM_STATUS(index_extract_one(dev, top, tmp, FALSE)) != DITEM_SUCCESS)
+ status = DITEM_FAILURE;
+ return status | DITEM_RESTORE;
}
int
diff --git a/release/sysinstall/package.c b/release/sysinstall/package.c
index 96058b97c8ea..3b0090dca2d7 100644
--- a/release/sysinstall/package.c
+++ b/release/sysinstall/package.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: package.c,v 1.70 1999/05/12 07:12:01 jkh Exp $
+ * $Id: package.c,v 1.71 1999/05/12 09:02:36 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -117,15 +117,15 @@ package_extract(Device *dev, char *name, Boolean depended)
if (package_exists(name))
return DITEM_SUCCESS;
- /* If necessary, initialize the ldconfig hints */
- if (!file_readable("/var/run/ld.so.hints"))
- vsystem("ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib");
-
if (!dev->init(dev)) {
msgConfirm("Unable to initialize media type for package extract.");
return DITEM_FAILURE;
}
+ /* If necessary, initialize the ldconfig hints */
+ if (!file_readable("/var/run/ld.so.hints"))
+ vsystem("ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib");
+
/* Be initially optimistic */
ret = DITEM_SUCCESS | DITEM_RESTORE;
/* Make a couple of paranoid locations for temp files to live if user specified none */
@@ -136,10 +136,12 @@ package_extract(Device *dev, char *name, Boolean depended)
Mkdir(variable_get(VAR_PKG_TMPDIR));
vsystem("chmod 1777 %s", variable_get(VAR_PKG_TMPDIR));
- if (!strpbrk(name, "-_"))
- sprintf(path, "packages/Latest/%s.tgz", name);
- else if (!index(name, '/'))
- sprintf(path, "packages/All/%s%s", name, strstr(name, ".tgz") ? "" : ".tgz");
+ if (!index(name, '/')) {
+ if (!strpbrk(name, "-_"))
+ sprintf(path, "packages/Latest/%s.tgz", name);
+ else
+ sprintf(path, "packages/All/%s%s", name, strstr(name, ".tgz") ? "" : ".tgz");
+ }
else
sprintf(path, "%s%s", name, strstr(name, ".tgz") ? "" : ".tgz");
diff --git a/usr.sbin/sysinstall/index.c b/usr.sbin/sysinstall/index.c
index da4c3e9389a4..7eb3ab38972f 100644
--- a/usr.sbin/sysinstall/index.c
+++ b/usr.sbin/sysinstall/index.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: index.c,v 1.64 1999/04/06 08:25:52 jkh Exp $
+ * $Id: index.c,v 1.65 1999/05/12 09:02:34 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -70,9 +70,10 @@ _strdup(char *ptr)
static char *descrs[] = {
"Package Selection", "To mark a package, move to it and press SPACE. If the package is\n"
"already marked, it will be unmarked or deleted (if installed).\n"
+ "Items marked with a 'D' are dependencies which will be auto-loaded\n."
"To search for a package by name, press ESC. To select a category,\n"
"press RETURN. NOTE: The All category selection creates a very large\n"
- "submenu. If you select it, please be patient while it comes up.",
+ "submenu! If you select it, please be patient while it comes up.",
"Package Targets", "These are the packages you've selected for extraction.\n\n"
"If you're sure of these choices, select OK.\n"
"If not, select Cancel to go back to the package selection menu.\n",
@@ -626,8 +627,9 @@ index_extract(Device *dev, PkgNodePtr top, PkgNodePtr plist)
int status = DITEM_SUCCESS;
for (tmp = plist->kids; tmp && tmp->name; tmp = tmp->next)
- status |= index_extract_one(dev, top, tmp, FALSE);
- return status;
+ if (DITEM_STATUS(index_extract_one(dev, top, tmp, FALSE)) != DITEM_SUCCESS)
+ status = DITEM_FAILURE;
+ return status | DITEM_RESTORE;
}
int
diff --git a/usr.sbin/sysinstall/package.c b/usr.sbin/sysinstall/package.c
index 96058b97c8ea..3b0090dca2d7 100644
--- a/usr.sbin/sysinstall/package.c
+++ b/usr.sbin/sysinstall/package.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: package.c,v 1.70 1999/05/12 07:12:01 jkh Exp $
+ * $Id: package.c,v 1.71 1999/05/12 09:02:36 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -117,15 +117,15 @@ package_extract(Device *dev, char *name, Boolean depended)
if (package_exists(name))
return DITEM_SUCCESS;
- /* If necessary, initialize the ldconfig hints */
- if (!file_readable("/var/run/ld.so.hints"))
- vsystem("ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib");
-
if (!dev->init(dev)) {
msgConfirm("Unable to initialize media type for package extract.");
return DITEM_FAILURE;
}
+ /* If necessary, initialize the ldconfig hints */
+ if (!file_readable("/var/run/ld.so.hints"))
+ vsystem("ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib");
+
/* Be initially optimistic */
ret = DITEM_SUCCESS | DITEM_RESTORE;
/* Make a couple of paranoid locations for temp files to live if user specified none */
@@ -136,10 +136,12 @@ package_extract(Device *dev, char *name, Boolean depended)
Mkdir(variable_get(VAR_PKG_TMPDIR));
vsystem("chmod 1777 %s", variable_get(VAR_PKG_TMPDIR));
- if (!strpbrk(name, "-_"))
- sprintf(path, "packages/Latest/%s.tgz", name);
- else if (!index(name, '/'))
- sprintf(path, "packages/All/%s%s", name, strstr(name, ".tgz") ? "" : ".tgz");
+ if (!index(name, '/')) {
+ if (!strpbrk(name, "-_"))
+ sprintf(path, "packages/Latest/%s.tgz", name);
+ else
+ sprintf(path, "packages/All/%s%s", name, strstr(name, ".tgz") ? "" : ".tgz");
+ }
else
sprintf(path, "%s%s", name, strstr(name, ".tgz") ? "" : ".tgz");