From nobody@FreeBSD.org  Fri Nov 10 15:23:50 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0BE0516A47B
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 10 Nov 2006 15:23:50 +0000 (UTC)
	(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 70B5643D4C
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 10 Nov 2006 15:23:44 +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 kAAFNf9C094173
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 10 Nov 2006 15:23:41 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id kAAFNea5094172;
	Fri, 10 Nov 2006 15:23:40 GMT
	(envelope-from nobody)
Message-Id: <200611101523.kAAFNea5094172@www.freebsd.org>
Date: Fri, 10 Nov 2006 15:23:40 GMT
From: Jim Zelenka<jimz@telerama.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: portmanager crashes if /usr/local/share/portmanager/configure.db doesn't exist
X-Send-Pr-Version: www-3.0

>Number:         105377
>Category:       ports
>Synopsis:       sysutils/portmanager crashes if /usr/local/share/portmanager/configure.db doesn't exist
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 10 15:30:18 GMT 2006
>Closed-Date:    Sun Dec 24 22:30:54 GMT 2006
>Last-Modified:  Mon May  9 14:30:06 UTC 2011
>Originator:     Jim Zelenka
>Release:        6.2-PRERELEASE
>Organization:
>Environment:
FreeBSD hand 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #2: Thu Nov  2 14:28:03 EST 2006     root@:/usr/RELENG_6/obj/usr/RELENG_6/src/sys/HAND  i386

>Description:
I upgraded the ports collection with cvsup (tag=.) Next, I ran "portsdb -uU"
and then "pkgdb -uF". Finally, I rebuilt and reinstalled portmanager (0.4.1_6).
Now, when I run it, it dies like this:

hand# whoami
root
hand# ls /usr20/ports/dist/portmanager-0.4.1.tar.gz 
/usr20/ports/dist/portmanager-0.4.1.tar.gz
hand# rm /usr0/cores/*
remove /usr0/cores/portmanager.3212.core? y
remove /usr0/cores/portmanager.3230.core? y
remove /usr0/cores/portmanager.3750.core? y
remove /usr0/cores/portmanager.3768.core? y
hand# whoami
root
hand# portmanager devel/glib20
rCreateInstalledDbVerifyContentsFile 0.4.1_6 error: "@comment ORIGIN:" not found in /var/db/pkg/panasas_bsd-6.0/+CONTENTS
                panasas_bsd-6.0 installation is corrupt!
                recomend running "pkg_delete -f panasas_bsd-6.0" then manually reinstalling this port
rCreateInstalledDbVerifyContentsFile 0.4.1_6 error: "@comment ORIGIN:" not found in /var/db/pkg/panasas_bsd-6.0/+CONTENTS
                panasas_bsd-6.0 installation is corrupt!
                recomend running "pkg_delete -f panasas_bsd-6.0" then manually reinstalling this port
------------------------------------------------------------------------
portmanager 0.4.1_6: Collecting installed port data 
------------------------------------------------------------------------
MGdbRead error, lstat of /usr/local/share/portmanager/configure.db failed
lstat: No such file or directory
Assertion failed: (0), function MGdbRead, file MGdbRead.c, line 66.
Abort (core dumped)
hand# ls -a /usr/local/share/portmanager
.                               bsd.port.mk-BACKUP              ignore.db                       ports_available.db              ports_dependencies.db
.                              commandLine.db                  patch-bsd.port.mk-0.3.6         ports_available_dependencies.db ports_installed.db
3strikes.db                     help.txt                        pkgtools-to-portmanager.rb      ports_cache.db                  ports_old.db

Obviously, dumping core is unfriendly. Less obvious is how I get a valid
configure.db. I tried touching the file to create a zero-length file, and that
eliminated the lstat complaint, but portmgr still dumped core.

>How-To-Repeat:
run portmanager when configure.db doesn't exist
>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: pav 
State-Changed-When: Tue Nov 21 20:57:51 UTC 2006 
State-Changed-Why:  
Currently, portmanager port is unmaintained, and the original author of this 
software abandoned it's development.  Unless you can supply us with a patch to 
solve this problem, I'm afraid there's little we can do. 

Do you have a patch to fix this problem? 


Responsible-Changed-From-To: freebsd-ports-bugs->pav 
Responsible-Changed-By: pav 
Responsible-Changed-When: Tue Nov 21 20:57:51 UTC 2006 
Responsible-Changed-Why:  
Currently, portmanager port is unmaintained, and the original author of this 
software abandoned it's development.  Unless you can supply us with a patch to 
solve this problem, I'm afraid there's little we can do. 

Do you have a patch to fix this problem? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=105377 
State-Changed-From-To: feedback->closed 
State-Changed-By: pav 
State-Changed-When: Sun Dec 24 22:30:33 UTC 2006 
State-Changed-Why:  
Feedback timeout (1 month) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=105377 

From: Aaron Woldman <aaron@visn.net>
To: bug-followup@FreeBSD.org, jimz@telerama.com
Cc:  
Subject: Re: ports/105377: sysutils/portmanager crashes if /usr/local/share/portmanager/configure.db
 doesn't exist
Date: Mon, 09 May 2011 09:21:22 -0400

 just a followup, I ran into this and a
 portmanager -s
 
 Will recreate a missing database.
>Unformatted:
