From sawada@zoo.ncl.omron.co.jp  Mon Dec  7 16:52:59 1998
Received: from omron-fc.omron.co.jp (omron-fc.omron.co.jp [202.235.10.56])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA11551
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 7 Dec 1998 16:52:58 -0800 (PST)
          (envelope-from sawada@zoo.ncl.omron.co.jp)
Received: from omron-ws.inet.omron.co.jp ([10.210.56.1])
	by omron-fc.omron.co.jp (8.8.8+2.7Wbeta7/3.7W) with ESMTP id JAA33236
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 8 Dec 1998 09:52:48 +0900
Received: from azalea.zoo.ncl.omron.co.jp by omron-ws.inet.omron.co.jp (8.8.8+2.7Wbeta7/4.03)
          id JAA38986; Tue, 8 Dec 1998 09:52:44 +0900
Received: from walsh.zoo.ncl.omron.co.jp (walsh.zoo.ncl.omron.co.jp [192.168.13.6])
	by azalea.zoo.ncl.omron.co.jp (8.8.7/3.6Wazalea-980206) with ESMTP id JAA22823;
	Tue, 8 Dec 1998 09:52:42 +0900 (JST)
Received: (from sawada@localhost) by walsh.zoo.ncl.omron.co.jp (8.8.8/3.3W9-zoo) id JAA26923; Tue, 8 Dec 1998 09:52:42 +0900 (JST)
Message-Id: <199812080052.JAA26923@walsh.zoo.ncl.omron.co.jp>
Date: Tue, 8 Dec 1998 09:52:42 +0900 (JST)
From: sawada@zoo.ncl.omron.co.jp
Reply-To: sawada@zoo.ncl.omron.co.jp
To: FreeBSD-gnats-submit@freebsd.org
Cc: sawada@zoo.ncl.omron.co.jp
Subject: ports/net/mirror reuses obsolete temporal db file.
X-Send-Pr-Version: 3.2

>Number:         9002
>Category:       ports
>Synopsis:       mirror reuses obsolete temporary db file
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    torstenb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec  7 17:00:01 PST 1998
>Closed-Date:    Fri Sep 10 14:10:22 PDT 1999
>Last-Modified:  Fri Sep 10 14:10:32 PDT 1999
>Originator:     Akira Sawada
>Release:        FreeBSD 2.2.6-RELEASE i386
>Organization:
OMRON Corporation
>Environment:

All OS which uses the new Berkeley DB library.

>Description:

mirror software (ports/net/mirror) creates some temporary files 
like /tmp/local_map.26767.db or /tmp/remote_map.26767.db where
the use_files option is on.
If we mirror more than one packages in a single mirror process, 
mirror reuses the db files without clearing the obsolete data.
Because mirror assumes that DB file name which is created by
dbopen function of perl must be one of
"*.pag", "*.dir", and "*.gdbm". 

>How-To-Repeat:

- use_files flag is on
- mirror more than one packages in a signle mirror process

>Fix:
	
--- mirror.pl.orig	Tue Dec  8 09:35:39 1998
+++ mirror.pl	Tue Dec  8 09:36:01 1998
@@ -3508,6 +3508,7 @@
 	unlink "$file.pag" if -e "$file.pag";
 	unlink "$file.dir" if -e "$file.dir";
 	unlink "$file.gdbm" if -e "$file.gdbm";
+	unlink "$file.db" if -e "$file.db";
 	unlink "$file" if -e "$file";
 }
 
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->torstenb 
Responsible-Changed-By: obrien 
Responsible-Changed-When: Fri Dec 11 16:15:43 PST 1998 
Responsible-Changed-Why:  
torstenb is the mirror mainainter 
State-Changed-From-To: open->closed 
State-Changed-By: torstenb 
State-Changed-When: Fri Sep 10 14:10:22 PDT 1999 
State-Changed-Why:  
patch applied 
>Unformatted:
