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.
This commit is contained in:
parent
01feef2c19
commit
1b164cce2b
@ -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 */
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user