Fix a long-standing bug that broke pkg_info utterly and probably made
pkg_add a little wiggy too. Document the fact that pkg_info can also take a URL.
This commit is contained in:
parent
82f99dbbda
commit
e8019cb42b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8423
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static const char *rcsid = "$Id: perform.c,v 1.13 1995/04/26 15:08:02 jkh Exp $";
|
||||
static const char *rcsid = "$Id: perform.c,v 1.14 1995/04/28 18:24:31 jkh Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -94,10 +94,14 @@ pkg_do(char *pkg)
|
||||
else if (fexists(pkg)) {
|
||||
int len;
|
||||
|
||||
if (!getcwd(fname, FILENAME_MAX))
|
||||
upchuck("getcwd");
|
||||
len = strlen(fname);
|
||||
snprintf(&fname[len], FILENAME_MAX - len, "/%s", pkg);
|
||||
if (*pkg != '/') {
|
||||
if (!getcwd(fname, FILENAME_MAX))
|
||||
upchuck("getcwd");
|
||||
len = strlen(fname);
|
||||
snprintf(&fname[len], FILENAME_MAX - len, "/%s", pkg);
|
||||
}
|
||||
else
|
||||
strcpy(fname, pkg);
|
||||
cp = fname;
|
||||
}
|
||||
else {
|
||||
|
@ -27,7 +27,7 @@
|
||||
.Op Fl cdDikrRpLqImv
|
||||
.Op Fl e Ar package
|
||||
.Op Fl l Ar prefix
|
||||
.Ar pkg-name ...
|
||||
.Ar pkg-name [pkg-name ...]
|
||||
.Nm pkg_info
|
||||
.Fl a
|
||||
.Op Ar flags
|
||||
@ -43,8 +43,9 @@ command.
|
||||
The following command line options are supported.
|
||||
.Bl -tag -width indent
|
||||
.It Ar pkg-name ...
|
||||
The named packages are described. Names may either be installed package
|
||||
names or pathnames to package distribution files.
|
||||
The named packages are described. A package name may either be the name of
|
||||
an installed package, the pathname to a package distribution file or a
|
||||
URL to an ftp available package.
|
||||
.It Fl a
|
||||
Show all currently installed packages.
|
||||
.It Fl v
|
||||
|
Loading…
Reference in New Issue
Block a user