Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Aug 1995 12:38:02 -0700 (PDT)
From:      "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
To:        fredriks@mcs.com (Lars Fredriksen)
Cc:        freebsd-current@freebsd.org
Subject:   Re: mtree confused?
Message-ID:  <199508091938.MAA07226@gndrsh.aac.dev.com>
In-Reply-To: <199508091259.HAA24377@fredriks.pr.mcs.net> from "Lars Fredriksen" at Aug 9, 95 07:59:02 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Hi,
> 	While building the world, I see the following messages from mtree:
> 
> mtree -deU -f /usr/src/etc/mtree/BSD.include.dist  -p /usr/include
> missing: ./machine (not created: File exists)
> missing: ./net (not created: File exists)
> missing: ./netccitt (not created: File exists)
> missing: ./netinet (not created: File exists)
> 
> 
> 	Now, how come the file can be both missing and exsisting???

Your subject is right on the money.  Mtree gets confused by symbolic
links.  The code that checks to see if an entry in the spec matches
an entry in the filesystem fails if the types of the 2 are different,
this casues the ``missing: ./blah'' part of the message.

Then it calls the create this entry code, which says, hold on one second,
there is something already sitting in the file system there, I don't
dare try to create it and emmits (not created: File exists).

The fix to this is not real easy, but should be something like adding
a -H option that says follow symlinks when doing the tree traversal.

Then if an entry in the spec says dir, and a symlink is found that points
to a dir it should just walk through the link and check that the dir
the link points to matches the spec.

Bruce evans may or maynot be working on this.  I know we have had discussions
about the problems with symlinks and mtree in the past, and even kicked
some ideas back and forth, and he even went in and fixed the nasty traversal
code that was broken with respect to steeping both the spec file and the
fts syncronously.

Bruce, do you see other solutions to this problem, or is what I state above
infact the right way to fix this?

-- 
Rod Grimes                                      rgrimes@gndrsh.aac.dev.com
Accurate Automation Company                 Reliable computers for FreeBSD



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508091938.MAA07226>