From owner-freebsd-current Wed Aug 9 12:38:33 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id MAA24696 for current-outgoing; Wed, 9 Aug 1995 12:38:33 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id MAA24689 for ; Wed, 9 Aug 1995 12:38:28 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id MAA07226; Wed, 9 Aug 1995 12:38:03 -0700 From: "Rodney W. Grimes" Message-Id: <199508091938.MAA07226@gndrsh.aac.dev.com> Subject: Re: mtree confused? To: fredriks@mcs.com (Lars Fredriksen) Date: Wed, 9 Aug 1995 12:38:02 -0700 (PDT) Cc: freebsd-current@freebsd.org In-Reply-To: <199508091259.HAA24377@fredriks.pr.mcs.net> from "Lars Fredriksen" at Aug 9, 95 07:59:02 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1785 Sender: current-owner@freebsd.org Precedence: bulk > > 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