Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2001 21:12:40 +0200
From:      Jean-Sebastien Roy <js@jeannot.org>
To:        Maxim Sobolev <sobomax@FreeBSD.ORG>
Cc:        knu@iDaemons.org (Akinori MUSHA), freebsd-ports@FreeBSD.ORG
Subject:   Re: Problem removing links to directories with pkg_delete
Message-ID:  <p04330101b79dd5c0ffda@[192.168.0.2]>
In-Reply-To: <200108130929.f7D9T6K11536@vega.vega.com>
References:  <200108130929.f7D9T6K11536@vega.vega.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 12:28 +0300 13/08/01, Maxim Sobolev wrote:
> >
>> >At Sun, 12 Aug 2001 22:10:25 +0200,
>> >Jean-Sebastien Roy wrote:
>> >> I made a port (scilab 2.6, see: ports/26997) that includes a file
>> >> named "config" in it's plist. This file is a link to a
>> >> directory. (the name has no importance)
>> >>
>> >> When I use "make deinstall" to uninstall the port, everything is fine.
>> >> (I used the recommanded test ordering in the handbook and everything went fine)
>> >>
>> >> But when I use pkg_delete, it complains that the directory enclosing
>> >> "config" cannot be removed because it is not empty. Indeed, it
>> >> contains "config", which was not removed. I suppose it's because its
>> >> MD5 checksum changed while pkg_delete removed file in the directory
>> >> "config" points to.
>> >> What is the recomended way to cope with this problem (and with links
>> >> inside plist in general) ?
>> >
>> >List the symlink prior to the file/directory it points to. :)
>>
>> Of course... but it breaks the handbook recommendation to keep the files sorted alphabeticaly. It's the only solution ?
>
>I have a patch in the local CVS that changes the way pkg_create(8)
>registers checksums of symlinks - i.e. instead of checksum of entry
>the link is poining to it registers checksum of the value returned
>by readlink(2). This should fix the problem in question.
>
>I'll try to commit this fix after 4.4 is out.
>
>-Maxim

Great ! ... since in fact, I've just tried to reorder the plist, and it did not work right, because the MD5 of the link after a pkg_add does not seem to be equal to the MD5 calculated during "make package". (I may be mistaken somehow but it does not work : reordering only enables pkg_delete to work after a make install)

I'll (try to) put a few "@unexec rm -f file" lines to clean up the links by hand.

js

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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