NetBSD Problem Report #14214

Received: (qmail 7917 invoked from network); 10 Oct 2001 19:52:39 -0000
Message-Id: <20011010195239.1313F7EDA@beowulf.gw.com>
Date: Wed, 10 Oct 2001 15:52:39 -0400 (EDT)
From: christos@zoulas.com
Reply-To: christos@zoulas.com
To: gnats-bugs@gnats.netbsd.org
Subject: mtree gets confused with symlinks
X-Send-Pr-Version: 3.95

>Number:         14214
>Category:       bin
>Synopsis:       mtree gets confused with symlinks
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 10 19:53:00 +0000 2001
>Closed-Date:    
>Last-Modified:  Sat Jun 16 06:47:16 +0000 2012
>Originator:     Christos Zoulas
>Release:        20011010
>Organization:
	stack-em-up-straight
>Environment:
System: NetBSD beowulf.gw.com 1.5X NetBSD 1.5X (GW-GENERIC) #36: Sat Jul 28 11:41:19 EDT 2001 kim@nix.suominen.org:/net/nix/src-3/NetBSD/cvsroot/src/sys/arch/i386/compile/GW-GENERIC i386
Architecture: i386
Machine: i386
>Description:
missing: ./var (not created: File exists)
missing: ./var/account (not created: File exists)
missing: ./var/at (not created: File exists)
missing: ./var/at/jobs (not created: File exists)
missing: ./var/at/spool (not created: File exists)
missing: ./var/backups (not created: File exists)
missing: ./var/crash (not created: File exists)
>How-To-Repeat:
	mv /var /usr
	cd /
	ln -s usr/var
	cd /usr/src
	make build
>Fix:
	none
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: lukem 
State-Changed-When: Wed Nov 7 00:05:07 PST 2001 
State-Changed-Why:  
I've recently added -L and -P to mtree(8) (idea from FreeBSD). 
-P is the default, and the current behaviour. 
-L means fts(3) walk `logically' (FTS_LOGICAL). 

mtree -L should solve your problem, although you may have to change any  
spec entries of links to files to type=file instead of type=link (e.g, 
./etc/localtime). 

Does this solve your problem? 



Responsible-Changed-From-To: bin-bug-people->lukem 
Responsible-Changed-By: lukem 
Responsible-Changed-When: Wed Nov 7 00:05:07 PST 2001 
Responsible-Changed-Why:  
I'm tracking it 
State-Changed-From-To: feedback->open 
State-Changed-By: christos 
State-Changed-When: Sat Jan 5 12:39:01 EST 2002 
State-Changed-Why:  
Shouldn't logical be the default? I.e. If I make /var a symlink, why should 
mtree complain? It seems perfectly fine to me. 
From: David Holland <dholland@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/14214: mtree gets confused with symlinks
Date: Tue, 24 Mar 2009 13:29:42 +0000

 (This was sent to gnats-admin instead of gnats-bugs.)

 From: Steven Drake <sbd@users.sf.net>
 To: gnats-admin@NetBSD.org
 Subject: PR bin/14214: mtree gets confused with symlinks
 Date: Tue, 24 Mar 2009 23:56:30 +1300 (NZDT)

 This patch seams to fix the problem, but mtree will still exit with code 2.

 patch is against mtree-20081105 (pkgsrc-2008Q4)
      $NetBSD: verify.c,v 1.5 2008/11/06 02:14:52 jschauma Exp $  

 --- verify.c.orig
 +++ verify.c
 @@ -148,7 +148,10 @@ vwalk(void)
                                 ep->flags |= F_VISIT;
                                 if (compare(ep, p))
                                         rval = MISMATCHEXIT;
 -                               if (!(ep->flags & F_IGN) &&
 +                               if (ep->type == F_DIR && 
 +                                   p->fts_info == FTS_SL ) {
 +                                       fts_set(t, p, FTS_FOLLOW);
 +                               } else if (!(ep->flags & F_IGN) &&
                                     ep->type == F_DIR &&
                                     p->fts_info == FTS_D) {
                                         if (ep->child) {


Responsible-Changed-From-To: lukem->bin-bug-people
Responsible-Changed-By: lukem@NetBSD.org
Responsible-Changed-When: Sat, 16 Jun 2012 06:47:16 +0000
Responsible-Changed-Why:


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.