- document $PKG_PATH

- use -v on pkg_add for dependent packages (forgot on last commit)
 - most important: do string-magic on the right variable when trying
   to find dependent packages on the local disk (i.e. package given as
   filename, not URL)
This commit is contained in:
hubertf 1997-10-16 00:55:01 +00:00
parent ce61c6263d
commit ca6157bdca
3 changed files with 22 additions and 9 deletions

View File

@ -1,10 +1,10 @@
/* $NetBSD: perform.c,v 1.5 1997/10/16 00:50:24 hubertf Exp $ */
/* $NetBSD: perform.c,v 1.6 1997/10/16 00:55:01 hubertf Exp $ */
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
static const char *rcsid = "$NetBSD: perform.c,v 1.5 1997/10/16 00:50:24 hubertf Exp $";
static const char *rcsid = "$NetBSD: perform.c,v 1.6 1997/10/16 00:55:01 hubertf Exp $";
#endif
#endif
@ -251,7 +251,7 @@ pkg_do(char *pkg)
if (cp) {
if (Verbose)
printf("Loading it from %s.\n", cp);
if (vsystem("pkg_add %s", cp)) {
if (vsystem("pkg_add %s%s", Verbose ? "-v " : "", cp)) {
warnx("autoload of dependency `%s' failed%s",
cp, Force ? " (proceeding anyway)" : "!");
if (!Force)

View File

@ -1,4 +1,4 @@
.\" $NetBSD: pkg_add.1,v 1.3 1997/10/16 00:31:45 hubertf Exp $
.\" $NetBSD: pkg_add.1,v 1.4 1997/10/16 00:55:05 hubertf Exp $
.\"
.\" FreeBSD install - a package for the installation and maintainance
.\" of non-core utilities.
@ -70,7 +70,11 @@ The following command line arguments are supported:
.It Ar pkg-name [... pkg-name]
The named packages are installed. A package name of - will cause
.Nm
to read from stdin.
to read from stdin. If the packages are not found in the current
working directory,
.Nm
will search them in each directory named by
.Ev PKG_PATH .
.It Fl v
Turn on verbose output.
.It Fl I
@ -323,6 +327,14 @@ is installed, even if the user might change it with the
.Fl p
flag to
.Cm pkg_add .
.Sh ENVIRONMENT
The value of the
.Ev PKG_PATH
is used if a given package can't be found. The environment variable
should be a series of entries seperated by colons. Each entry
consists of a directory name. The current directory may be indicated
implicitly by an empty directory name, or explicitly by a single
period.
.Sh SEE ALSO
.Xr pkg_create 1 ,
.Xr pkg_delete 1 ,

View File

@ -1,10 +1,10 @@
/* $NetBSD: file.c,v 1.4 1997/10/16 00:50:41 hubertf Exp $ */
/* $NetBSD: file.c,v 1.5 1997/10/16 00:55:08 hubertf Exp $ */
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp";
#else
static const char *rcsid = "$NetBSD: file.c,v 1.4 1997/10/16 00:50:41 hubertf Exp $";
static const char *rcsid = "$NetBSD: file.c,v 1.5 1997/10/16 00:55:08 hubertf Exp $";
#endif
#endif
@ -299,15 +299,16 @@ fileFindByPath(char *base, char *fname)
if (base) {
strcpy(tmp, base);
cp = strrchr(fname, '/');
cp = strrchr(tmp, '/');
if (cp) {
*cp = '\0'; /* chop name */
cp = strrchr(fname, '/');
cp = strrchr(tmp, '/');
}
if (cp) {
*(cp + 1) = '\0';
strcat(cp, "All/");
strcat(cp, fname);
strcat(cp, ".tgz");
if (fexists(tmp))
return tmp;
}