summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-04-10 08:01:52 +0000
committerjkh <jkh@FreeBSD.org>1995-04-10 08:01:52 +0000
commit3e496240b4efc0f4e8498ffe6ad9f4cce26624ac (patch)
treec9300daed6e6af52adcf40f37e245ac8e1e3a9e0 /usr.sbin/pkg_install
parent2c50cf3c25ea1846fa283f1da0972560b8b14dd9 (diff)
downloadFreeBSD-src-3e496240b4efc0f4e8498ffe6ad9f4cce26624ac.zip
FreeBSD-src-3e496240b4efc0f4e8498ffe6ad9f4cce26624ac.tar.gz
Neither of these tools really told you what you needed to know neatly
and succinctly in verbose mode. I hope people find this more to their liking.
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/add/perform.c16
-rw-r--r--usr.sbin/pkg_install/create/perform.c19
2 files changed, 24 insertions, 11 deletions
diff --git a/usr.sbin/pkg_install/add/perform.c b/usr.sbin/pkg_install/add/perform.c
index da64fae..b594596 100644
--- a/usr.sbin/pkg_install/add/perform.c
+++ b/usr.sbin/pkg_install/add/perform.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char *rcsid = "$Id: perform.c,v 1.13 1994/12/06 00:51:34 jkh Exp $";
+static const char *rcsid = "$Id: perform.c,v 1.14 1995/04/09 15:04:52 jkh Exp $";
#endif
/*
@@ -142,13 +142,17 @@ pkg_do(char *pkg)
for (p = Plist.head; p ; p = p->next) {
if (p->type != PLIST_PKGDEP)
continue;
+ if (Verbose)
+ printf("Package `%s' depends on `%s'", PkgName, p->name);
if (!Fake && vsystem("pkg_info -e %s", p->name)) {
char tmp[120];
+ if (Verbose)
+ printf(" which is not currently loaded");
sprintf(tmp, "%s/%s.tgz", Home, p->name);
if (fexists(tmp)) {
if (Verbose)
- printf("Package `%s' depends on `%s': Trying to load it.\n", PkgName, p->name);
+ printf(" but was found - loading:\n");
if (vsystem("pkg_add %s", tmp)) {
whinge("Autoload of dependency package `%s' failed!%s",
p->name, Force ? " (proceeding anyway)" : "");
@@ -156,15 +160,17 @@ pkg_do(char *pkg)
code++;
}
else if (Verbose)
- printf("Dependency `%s' loaded successfully.\n", p->name);
+ printf("\t`%s' loaded successfully.\n", p->name);
}
else {
- whinge("Package `%s' depends on missing package `%s'%s.", PkgName,
- p->name, Force ? " (proceeding anyway)" : "");
+ whinge("and was not found%s.", p->name,
+ Force ? " (proceeding anyway)" : "");
if (!Force)
code++;
}
}
+ else if (Verbose)
+ printf(" - already installed.\n");
}
if (code != 0)
goto success; /* close enough for government work */
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c
index fb72a51..f83f309 100644
--- a/usr.sbin/pkg_install/create/perform.c
+++ b/usr.sbin/pkg_install/create/perform.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char *rcsid = "$Id: perform.c,v 1.14 1994/12/06 00:51:37 jkh Exp $";
+static const char *rcsid = "$Id: perform.c,v 1.15 1995/04/09 15:05:00 jkh Exp $";
#endif
/*
@@ -63,13 +63,20 @@ pkg_perform(char **pkgs)
suffix = "tgz";
/* Stick the dependencies, if any, at the top */
- while (Pkgdeps) {
- cp = strsep(&Pkgdeps, " \t\n");
- if (*cp) {
- add_plist(&plist, PLIST_PKGDEP, cp);
+ if (Pkgdeps) {
+ if (Verbose)
+ printf("Registering depends:");
+ while (Pkgdeps) {
+ cp = strsep(&Pkgdeps, " \t\n");
+ if (*cp) {
+ add_plist(&plist, PLIST_PKGDEP, cp);
+ if (Verbose)
+ printf(" %s", cp);
+ }
}
+ if (Verbose)
+ printf(".\n");
}
-
/* Slurp in the packing list */
read_plist(&plist, pkg_in);
OpenPOWER on IntegriCloud