From owner-freebsd-current Wed Jun 26 13: 2: 5 2002 Delivered-To: freebsd-current@freebsd.org Received: from shale.csir.co.za (shale.csir.co.za [146.64.46.5]) by hub.freebsd.org (Postfix) with ESMTP id 3DB1037C4D9; Wed, 26 Jun 2002 12:30:25 -0700 (PDT) Received: (from reg@localhost) by shale.csir.co.za (8.11.6/8.11.6) id g5QJTwG64157; Wed, 26 Jun 2002 21:29:58 +0200 (SAT) (envelope-from reg) Date: Wed, 26 Jun 2002 21:29:58 +0200 From: Jeremy Lea To: Beech Rintoul Cc: freebsd-current@FreeBSD.ORG, markm@FreeBSD.ORG Subject: Re: pkg_version segfaults Message-ID: <20020626212958.A64137@shale.csir.co.za> Mail-Followup-To: Jeremy Lea , Beech Rintoul , freebsd-current@FreeBSD.ORG, markm@freebsd.org References: <20020625234350.A0D2020EEE@yeoman.sinbad.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020625234350.A0D2020EEE@yeoman.sinbad.net>; from akbeech@sinbad.net on Tue, Jun 25, 2002 at 03:43:49PM -0800 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, On Tue, Jun 25, 2002 at 03:43:49PM -0800, Beech Rintoul wrote: > Using the new C pkg_version I get the following: OK, the problem is that you've got a number of ports with no +CONTENTS files in /var/db/pkg... This is not good. But pkg_version shouldn't be dumping core anyway: Index: perform.c =================================================================== RCS file: /usr/home/ncvs/src/usr.sbin/pkg_install/version/perform.c,v retrieving revision 1.1 diff -u -r1.1 perform.c --- perform.c 24 Jun 2002 16:03:24 -0000 1.1 +++ perform.c 26 Jun 2002 19:24:18 -0000 @@ -109,6 +109,10 @@ } read_plist(&plist, fp); fclose(fp); + if (plist.name == NULL) { + warnx("%s does not appear to be a valid package!", pkg); + return 1; + } /* * First we check if the installed package has an origin, and try Hopefully I can get this committed soon... Regards, -Jeremy -- FreeBSD - Because the best things in life are free... http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message