From owner-freebsd-bugs Fri Dec 22 10:30: 7 2000 From owner-freebsd-bugs@FreeBSD.ORG Fri Dec 22 10:30:03 2000 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 039E037B400 for ; Fri, 22 Dec 2000 10:30:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id eBMIU2W99078; Fri, 22 Dec 2000 10:30:02 -0800 (PST) (envelope-from gnats) Date: Fri, 22 Dec 2000 10:30:02 -0800 (PST) Message-Id: <200012221830.eBMIU2W99078@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Maxime Henrion Subject: Re: bin/23083: pkg_add returns 0 even if the package is not found Reply-To: Maxime Henrion Sender: gnats@FreeBSD.org Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/23083; it has been noted by GNATS. From: Maxime Henrion To: freebsd-gnats-submit@FreeBSD.org Cc: Jim.Pirzyk@disney.com Subject: Re: bin/23083: pkg_add returns 0 even if the package is not found Date: Fri, 22 Dec 2000 19:30:01 +0100 --dc+cDN39EJAMEtIO Content-Type: multipart/mixed; boundary="n8g4imXOkfNTN/H1" Content-Disposition: inline --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Attached is a patch which solve this problem. Regards, Maxime Henrion --=20 Don't be fooled by cheap finnish imitations ; BSD is the One True Code --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pkg_add.diff" *** /usr/src/usr.sbin/pkg_install/add/main.c Tue Jul 18 03:50:09 2000 --- main.c Fri Dec 22 19:25:14 2000 *************** *** 151,157 **** pkgs[ch] = realpath(*argv, pkgnames[ch]); else { /* look for the file in the expected places */ if (!(cp = fileFindByPath(NULL, *argv))) ! warnx("can't find package '%s'", *argv); else pkgs[ch] = strcpy(pkgnames[ch], cp); } --- 151,158 ---- pkgs[ch] = realpath(*argv, pkgnames[ch]); else { /* look for the file in the expected places */ if (!(cp = fileFindByPath(NULL, *argv))) ! /* let pkg_do() fail later, so that error is reported */ ! pkgs[ch] = strcpy(pkgnames[ch], *argv); else pkgs[ch] = strcpy(pkgnames[ch], cp); } --n8g4imXOkfNTN/H1-- --dc+cDN39EJAMEtIO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjpDnakACgkQq1Ae8oy+mdbk3ACfa1yntArbzbvrz5X+07sjOLLA 8IcAoMIJOU0bOkyl1tGJTDsNYZjxiIWX =vWUM -----END PGP SIGNATURE----- --dc+cDN39EJAMEtIO-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message