Subject: Re: rmdir inside a union-mounted dir
To: None <>
From: Ian D. Leroux <>
List: netbsd-users
Date: 03/29/2005 17:16:19
On Mon, 28 Mar 2005 09:35:42 +0000 (UTC), "Martijn van Buul"
<> said:
> It occurred to me that Dieter wrote in gmane.os.netbsd.general:
> >> is there something else I could do to prevent pkg_delete from
> >> wreaking havoc?
> >
> > mount -u -r /usr
> >
> > I keep /usr and a few other filesystems mounted readonly most of
> > the time.
> Well, but that would have the same effect as telling pkg_delete only
> to remove the entries in /var/db/pkg. And, it would *prevent* packages
> from installing later on.

I avoid that by moving PKGDBDIR (spelling?) to /usr/pkg/pkgdb (or
somewhere that's on the same partition as the base of your package
tree).  This way they get locked and unlocked together: the metadata is
read-only as long as the data is, and vice versa. Since you seem to have
found another way 'round, this is more for the archives though.


Ian Leroux