From owner-freebsd-questions@FreeBSD.ORG Tue Nov 18 14:16:16 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 62AB21065670 for ; Tue, 18 Nov 2008 14:16:16 +0000 (UTC) (envelope-from tfcheng@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id 186598FC0A for ; Tue, 18 Nov 2008 14:16:15 +0000 (UTC) (envelope-from tfcheng@gmail.com) Received: by an-out-0708.google.com with SMTP id b6so1229769ana.13 for ; Tue, 18 Nov 2008 06:16:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=0dYEiG94kdk+XwrR8vd3GMwJ3e54edBRGKHhiMNphQ8=; b=ZZXlKET44mpjn2fgtjv5a/wVeG7WeVUjpTMNVXkErvoW5Ubp+X8juKON1/sBP5wI7R gYG5gMIEQaJpWcBlt3vzDOlf63s77+uuc4S5Vno8JLF6j1qSPTHjno+3V83XTwoYKWob z4R2uQQNHzFaUZchIQryX/34PUQjpUD7I99lc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=dBdUO+b0KvpaPAktUsKQ3/UgJEk/eD61+BmjqYl3qwkSSkssTbKyzgeeVArAgF7BA1 RV4xCq7j7T570nOHFjWOgVxdjDo2UqLovd47gRK5sYno849Mh4plb6c61gpAgIgvkvh8 rKvKKwTAZCWJI8Ley/AJipGVNvcCqwF8Qc+Jw= Received: by 10.143.12.19 with SMTP id p19mr2612984wfi.147.1227017774966; Tue, 18 Nov 2008 06:16:14 -0800 (PST) Received: by 10.142.143.20 with HTTP; Tue, 18 Nov 2008 06:16:14 -0800 (PST) Message-ID: Date: Tue, 18 Nov 2008 09:16:14 -0500 From: "Tsu-Fan Cheng" To: Mel In-Reply-To: <200811181416.43391.fbsd.questions@rachie.is-a-geek.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200811180651.33337.fbsd.questions@rachie.is-a-geek.net> <200811181416.43391.fbsd.questions@rachie.is-a-geek.net> Cc: freebsd-questions@freebsd.org 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 14:16:16 -0000 it works!! thanks Mel. TFC On Tue, Nov 18, 2008 at 8:16 AM, Mel wrote: > 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; >