From 6e78c7b340089cbe39a50a2c0a190937ea1c9ada Mon Sep 17 00:00:00 2001 From: jkh Date: Wed, 10 May 1995 23:00:07 +0000 Subject: 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. --- usr.sbin/pkg_install/info/perform.c | 14 +++++++++----- usr.sbin/pkg_install/info/pkg_info.1 | 7 ++++--- 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'usr.sbin/pkg_install') 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 -- cgit v1.1