From owner-freebsd-bugs@FreeBSD.ORG Sat Feb 11 11:50:05 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B01B16A420 for ; Sat, 11 Feb 2006 11:50:05 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 894DC43D48 for ; Sat, 11 Feb 2006 11:50:04 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1BBo4AF075688 for ; Sat, 11 Feb 2006 11:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1BBo4vl075687; Sat, 11 Feb 2006 11:50:04 GMT (envelope-from gnats) Resent-Date: Sat, 11 Feb 2006 11:50:04 GMT Resent-Message-Id: <200602111150.k1BBo4vl075687@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Eric Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B595716A420 for ; Sat, 11 Feb 2006 11:41:31 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8310F43D45 for ; Sat, 11 Feb 2006 11:41:31 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k1BBfVeF006473 for ; Sat, 11 Feb 2006 11:41:31 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k1BBfVYQ006472; Sat, 11 Feb 2006 11:41:31 GMT (envelope-from nobody) Message-Id: <200602111141.k1BBfVYQ006472@www.freebsd.org> Date: Sat, 11 Feb 2006 11:41:31 GMT From: Eric To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: misc/93178: patch for portmanager crash when trying to remove a MOVED port with -y option X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2006 11:50:05 -0000 >Number: 93178 >Category: misc >Synopsis: patch for portmanager crash when trying to remove a MOVED port with -y option >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Feb 11 11:50:03 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Eric >Release: RELENG_6 >Organization: >Environment: FreeBSD mybsd.mydomain.test 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #10: Fri Feb 10 01:45:19 EST 2006 root@mybsd.mydomain.test:/uu/obj/uu/src/sys/MYKERNEL i386 >Description: portmanager -v: rParseCommandLine 0.4.1_4 portmanager will always crash (bus error) when: -y option is provided, and an installed port was moved to other category, so portmanager trying to remove it. BackTrace shows the error happends at line 183 in libMGPM/src/MGPMrGetPortName.c >How-To-Repeat: execute: portmanager -u -bu -l -y and you have one installed port (ex, tomcat) which was moved to another category. portmanager will crash during cache building stage. >Fix: Patch: (This is the first time I submit PR, so not sure if this is correct) --------PATCH START--------- --- libMGPM/src/MGPMrGetPortName.c Wed Dec 14 10:27:41 2005 +++ libMGPM/src/MGPMrGetPortName2.c Fri Feb 10 21:43:34 2006 @@ -180,7 +180,8 @@ } else { - fclose( property->STDIN ); + if( property->autoMoved == 0 ) + fclose( property->STDIN ); MGPMlogAdd( property, "installed ", portName, " removed from system: no longer in ports tree: see /usr/ports/MOVED", " ", " " ); } --------PATCH END----------- >Release-Note: >Audit-Trail: >Unformatted: