dirrmtry: shared directories and can, should or must use
bsam at ipt.ru
Mon Mar 6 13:22:01 PST 2006
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 at 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?
> > 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
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
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
> Of course, using @dirrmtry instead of properly removing own installed
> files is wrong.
> > Is this command supposed to work only when building packages
> > (i.e. at pointyhat) or is it intended to be useful at other
> > servers/workstations (i.e. not to disturb administrators when
> > upgrading their systems)?
> In all cases, when either pkg-delete or make deinstall are used.
Then one must use @dirrmtry. ;-)
Boris B. Samorodov, Research Engineer
InPharmTech Co, http://www.ipt.ru
Telephone & Internet Service Provider
More information about the freebsd-ports