On Thu, 24 Aug 2006 18:50:52 +0400 "Andrew Pantyukhin" <[EMAIL PROTECTED]> mentioned:
> On 8/24/06, Jeremy Messenger <[EMAIL PROTECTED]> wrote: > > On Thu, 24 Aug 2006 08:26:53 -0500, Andrew Pantyukhin > > <[EMAIL PROTECTED]> wrote: > > > > > I can't help thinking that the way we're trying to deal with > > > locale directories is far from optimal. IMHO, there are > > > several ways to improve the state of things: > > > > I think the current how we handle locale is a bit silly, so I personal in > > favor of create localehier like misc/gnomehier than four suggested below.. > > Honestly, I would be more rather to put mtree that is for ports in > > somewhere of /usr/ports/ than /etc/mtree/ that way any version of FreeBSD > > won't have any of left over directories problem. > > It's a good idea, but we're back at the second question - > what if someone fancies to pkg_delete -xf gnomehier? > There will be no way to get a clean system after that > other than by reinstalling gnomehier and deleting it after > all the ports requiring it. > That's not the main problem, and hasn't point at all since we doesn't support such kind of deinstalls - dependent ports should be deinstalled before dependencies. The main argument for deinstalling all files/direcotries that port creates follows from FreeBSD ports goal to support different PREFIXES. That is, you can install gettext into /usr/local and smth that depends on gettext into /usr/local/opt. In that case all these share/locale/xxx dirs will be created under /usr/local/opt PREFIX and if this dependent port will not make effort to remove these files/directories on deinstall, they will stay under /usr/local/opt forever, though not listed in ${MTREE_FILE}. The only possible solution I can imagine is to add these direcories into mtree file, but since all pacthes are alredy there, there is no reason doing this now. Just port committers should check PLISTS accurately. This could be achieved by installing port with non standard PREFIX=xxx, deinstalling it and looking for directories/files left. The other possible solution is to implement some technique to automatically gather directories dependencies created and add them into plist. But this rather can't be achieved now, since we currently doesn't list directories in plist, and we can't rely on @dirrm for they can be deleted also with rm -rf, rmdir and even with `set xxx=`mktemp /tmp/1.XXXXXX` && echo '#include <stdlib.h>\n#include <unistd.h>\nint main(){rmdir("/path/to/dir"); return 0;}' > ${xxx} && ${CC} -o ${xxx:r} ${xxx} && ${xxx:r}` ;-) -- Stanislav Sedov MBSD labs, Inc. <[EMAIL PROTECTED]> Россия, Москва http://mbsd.msk.ru -------------------------------------------------------------------- If the facts don't fit the theory, change the facts. -- A. Einstein -------------------------------------------------------------------- PGP fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581
signature.asc
Description: PGP signature