From owner-freebsd-questions@FreeBSD.ORG Tue Nov 18 13:16:46 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EFB3106564A for ; Tue, 18 Nov 2008 13:16:46 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id DF4748FC1E for ; Tue, 18 Nov 2008 13:16:45 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (mail.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id 0F8DFAFC1C6; Tue, 18 Nov 2008 04:16:45 -0900 (AKST) From: Mel To: freebsd-questions@freebsd.org Date: Tue, 18 Nov 2008 14:16:42 +0100 User-Agent: KMail/1.9.7 References: <200811180651.33337.fbsd.questions@rachie.is-a-geek.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811181416.43391.fbsd.questions@rachie.is-a-geek.net> Cc: Tsu-Fan Cheng Subject: Re: pkg_delete core dump X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2008 13:16:46 -0000 On Tuesday 18 November 2008 13:37:11 Tsu-Fan Cheng wrote: > Hi Mel, > the link to download the +CONTENTS file is here > http://www.megaupload.com/?d=YDKFRCZG, and you know what? I don't have > +REQUIRED_BY file. thanks!! > > there is a empty entry in the +CONTENTS file: > > [snip] > @pkgdep linux-scim-libs-1.4.4 > @comment DEPORIGIN:textproc/linux-scim-libs > @pkgdep > @comment $FreeBSD: ports/print/acroread8/pkg-plist,v 1.2 2008/04/13 > 18:36:28 hrs Exp $ That's definetely the cause of the crash. The patch below should guard against pkg_delete crashing. How this line got created in the first place, is very weird. I would run: grep -E '^@(pkgdep|name)[[:space:]]*$' /var/db/pkg/*/+CONTENTS Which would show all dependency lines and name directives that are empty. Maybe there's a common factor. For the moment my money is on linux-nvu as that would be the dependency that belongs at the empty spot: # make -C /usr/ports/print/acroread8 actual-package-depends | sort -u -t : -k 2 linux-atk-1.9.1:accessibility/linux-atk linux-glib2-2.6.6_1:devel/linux-glib2 linux_base-fc-4_13:emulators/linux_base-fc4 linux-cairo-1.0.2:graphics/linux-cairo linux-jpeg-6b.34:graphics/linux-jpeg linux-png-1.2.8_2:graphics/linux-png linux-tiff-3.7.1:graphics/linux-tiff hicolor-icon-theme-0.10_2:misc/hicolor-icon-theme acroreadwrapper-0.0.20080906:print/acroreadwrapper linux-expat-1.95.8:textproc/linux-expat linux-scim-libs-1.4.4:textproc/linux-scim-libs linux-nvu-1.0:www/linux-nvu linux-fontconfig-2.2.3_7:x11-fonts/linux-fontconfig linux-hicolor-icon-theme-0.5_1:x11-themes/linux-hicolor-icon-theme linux-gtk2-2.6.10:x11-toolkits/linux-gtk2 linux-pango-1.10.2:x11-toolkits/linux-pango linux-xorg-libs-6.8.2_5:x11/linux-xorg-libs -- Mel Index: plist.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/pkg_install/lib/plist.c,v retrieving revision 1.52 diff -u -r1.52 plist.c --- plist.c 28 Mar 2007 05:33:52 -0000 1.52 +++ plist.c 18 Nov 2008 12:51:02 -0000 @@ -31,6 +31,11 @@ { PackingList tmp; + if( arg == NULL || arg[0] == '\0' ) + { + warnx("Invalid packing list line ignored"); + return; + } tmp = new_plist_entry(); tmp->name = copy_string(arg); tmp->type = type; @@ -61,6 +66,11 @@ { PackingList tmp; + if( arg == NULL || arg[0] == '\0' ) + { + warnx("Invalid packing list line ignored"); + return; + } tmp = new_plist_entry(); tmp->name = copy_string(arg); tmp->type = type;