Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2002 09:36:22 +0200
From:      Jeremy Lea <reg@FreeBSD.ORG>
To:        "David W. Chapman Jr." <dwcjr@inethouston.net>
Cc:        current@FreeBSD.ORG, ports@FreeBSD.ORG
Subject:   Re: pkg_version and no origin found == SEGFAULT
Message-ID:  <20020826093622.A60230@shale.csir.co.za>
In-Reply-To: <20020825171350.GA89121@leviathan.inethouston.net>; from dwcjr@inethouston.net on Sun, Aug 25, 2002 at 12:13:50PM -0500
References:  <20020825164731.GA88696@leviathan.inethouston.net> <20020825130007.35cdd0b9.ak03@gte.com> <20020825171350.GA89121@leviathan.inethouston.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Sun, Aug 25, 2002 at 12:13:50PM -0500, David W. Chapman Jr. wrote:
> This is exactly the problem I'm seeing and would explain why 
> portupgrade -f fixes the problem for the port that causes the segfault.
> Shouldn't pkg_version handle this a little more gracefully?

Can someone with a src commit bit please do the honours...

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

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?20020826093622.A60230>