Date: Wed, 26 Jun 2002 21:29:58 +0200 From: Jeremy Lea <reg@FreeBSD.ORG> To: Beech Rintoul <akbeech@sinbad.net> Cc: freebsd-current@FreeBSD.ORG, markm@FreeBSD.ORG Subject: Re: pkg_version segfaults Message-ID: <20020626212958.A64137@shale.csir.co.za> In-Reply-To: <20020625234350.A0D2020EEE@yeoman.sinbad.net>; from akbeech@sinbad.net on Tue, Jun 25, 2002 at 03:43:49PM -0800 References: <20020625234350.A0D2020EEE@yeoman.sinbad.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020626212958.A64137>