summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-10 23:00:07 +0000
committerjkh <jkh@FreeBSD.org>1995-05-10 23:00:07 +0000
commit6e78c7b340089cbe39a50a2c0a190937ea1c9ada (patch)
tree6ac672a72f1763662eec275a7d54e89ad6b4b6b4 /usr.sbin/pkg_install
parent2093ba9e8f522f684222acb75fdd3e999c043029 (diff)
downloadFreeBSD-src-6e78c7b340089cbe39a50a2c0a190937ea1c9ada.zip
FreeBSD-src-6e78c7b340089cbe39a50a2c0a190937ea1c9ada.tar.gz
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.
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/info/perform.c14
-rw-r--r--usr.sbin/pkg_install/info/pkg_info.17
2 files changed, 13 insertions, 8 deletions
diff --git a/usr.sbin/pkg_install/info/perform.c b/usr.sbin/pkg_install/info/perform.c
index f43da33..f039416 100644
--- a/usr.sbin/pkg_install/info/perform.c
+++ b/usr.sbin/pkg_install/info/perform.c
@@ -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 {
diff --git a/usr.sbin/pkg_install/info/pkg_info.1 b/usr.sbin/pkg_install/info/pkg_info.1
index 6cb73b0..acfce38 100644
--- a/usr.sbin/pkg_install/info/pkg_info.1
+++ b/usr.sbin/pkg_install/info/pkg_info.1
@@ -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
OpenPOWER on IntegriCloud