From owner-freebsd-ports Sat Sep 9 14: 8:11 2000 Delivered-To: freebsd-ports@freebsd.org Received: from mail.hiwaay.net (fly.HiWAAY.net [208.147.154.56]) by hub.freebsd.org (Postfix) with ESMTP id 7447B37B424; Sat, 9 Sep 2000 14:08:08 -0700 (PDT) Received: from bonsai.hiwaay.net (tnt6-216-180-4-137.dialup.HiWAAY.net [216.180.4.137]) by mail.hiwaay.net (8.11.0/8.11.0) with ESMTP id e89L7X703775; Sat, 9 Sep 2000 16:07:36 -0500 (CDT) Received: (from steve@localhost) by bonsai.hiwaay.net (8.11.0/8.9.3) id e89L7OG31392; Sat, 9 Sep 2000 16:07:24 -0500 (CDT) (envelope-from steve) Date: Sat, 9 Sep 2000 16:07:21 -0500 From: Steve Price To: Maxim Sobolev Cc: ports@FreeBSD.ORG, asami@FreeBSD.ORG Subject: Re: Handling of symlinks to directory in pkg_delete [patch for review] Message-ID: <20000909160721.B2089@bonsai.hiwaay.net> References: <39B351FA.A6CFD24F@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <39B351FA.A6CFD24F@FreeBSD.org>; from sobomax@FreeBSD.ORG on Mon, Sep 04, 2000 at 10:40:42AM +0300 X-Operating-System: FreeBSD 5.0-CURRENT i386 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, Sep 04, 2000 at 10:40:42AM +0300, Maxim Sobolev wrote: # Hi! # # I wonder if anybody noticed that handling of symlinks in pkg_delete is somewhat # broken. Particularly, the problems exist with symlinks to a directories. The # pkg_delete code considers those symlinks as a directories (if the referred # directory exists), however they are not, and thus tries to delete it using # rmdir(2), which obviously doesn't work. The workaround exists to delete # directory symlink points to first and only then remove corresponding symlinks, # however it looks like an ugly hack (see lesstif's PLIST for example). The # attached patch is expected to solve this problem. Also in this message I'm # attaching small fake package, which exposes the bug (it consist of one symlink # and one directory this symlink points to). [patch elided] Looks good to me. You might want to fix the style(9) in the new issymlink function. It would also be nice if along with this change you hunted down and fixed all the PLISTs that have rmdir hacks that are no longer required. I can test some of them for you if want. Better yet you could probably just submit patches to Satoshi and let the new package building cluster test your changes for you. -steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message