Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Mar 2006 01:43:15 +0300
From:      Boris Samorodov <bsam@ipt.ru>
To:        Ion-Mihai Tetcu <itetcu@people.tecnik93.com>
Cc:        ports@FreeBSD.org
Subject:   Re: dirrmtry: shared directories and can, should or must use
Message-ID:  <82919980@srv.sem.ipt.ru>
In-Reply-To: <20060306234410.10e770a4@it.buh.tecnik93.com> (Ion-Mihai Tetcu's message of "Mon, 6 Mar 2006 23:44:10 %2B0200")
References:  <61474466@srv.sem.ipt.ru> <20060306223259.3f2c6253@it.buh.tecnik93.com> <52516908@srv.sem.ipt.ru> <20060306234410.10e770a4@it.buh.tecnik93.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 6 Mar 2006 23:44:10 +0200 Ion-Mihai Tetcu wrote:
> On Tue, 07 Mar 2006 00:23:31 +0300
> Boris Samorodov <bsam@ipt.ru> wrote:
> > On Mon, 6 Mar 2006 22:32:59 +0200 Ion-Mihai Tetcu wrote:
> > > On Mon, 06 Mar 2006 17:40:45 +0300
> > > Boris Samorodov <bsam@ipt.ru> wrote:
> > 
> > > > At The Porters Handbook 7.2.1 Cleaning up empty directories we read
> > > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/plist-cleaning.html#PLIST-DIR-CLEANING
> > > > 
> > > > "However, sometimes @dirrm will give you errors because other ports
> > > > share the same directory. You can use @dirrmtry to remove only empty
> > > > directories without warning."
> > > > 
> > > > I don't quite understand the term "can" here. Is it supposed may,
> > > > should or must use @dirrmtry?
> > 
> > > Should.
> > >  
> > > > And what about non-empty but shared directories? May, should or must
> > > > we use @dirrmtry?
> > 
> > > Should. From what I understand from your phrasing all 3 sentences are
> > > equivalent.
> > 
> > I mean "may" is only an advice, "should" is a strong recommendation
> > and "must" -- there is no alternative. I.e. is it's up to maintainer
> > to decide which form to use or he must use @dirrmtry.

> > > The idea is that different ports install files in the same directories
> > > (that are not part of mtree). The ONLY reason to use @dirrmtry is to
> > > avoid "Unable to completely delete dir/x " type of warnings from
> > > pkg-delete.
> > 
> > But the Handbook uses a little bit another phrase: "to remove only
> > empty directories". I understand so: if a port installs empty
> > directory, it may use @dirrmtry. And I'm asking what if a port
> > installs (creates) non-empty but shared directory? I personally think
> > that a maintainer must use @dirrmtry for all shared (with other ports,
> > but not those the port conflicts with) directories (whether empty or
> > not).

> If both port A and B install files in D and A and B don't depend on
> each other then both MUST use @dirrmtry D.

Agreed. May be it's worth saying somewhere at the docs.

> If B depends on A and they both install files in D then neither should
> use  @dirrmtry (B mustn't  try to remove D because it didn't create it
> and A must @dirrm D since it has created it and B has already been
> deinstalled when A is pkg_delete'd).

Well, and here if an administrator upgrades port A then he will get
those warnings. But, yes, you are right. One shouldn't use dirrmtry
here.


WBR
-- 
Boris B. Samorodov, Research Engineer
InPharmTech Co,     http://www.ipt.ru
Telephone & Internet Service Provider



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