tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: OWN_DIRS semantics



On Fri, Sep 15, 2017 at 07:18:52PM +0000, Johnny C. Lam wrote:
> 
> I've noticed that some packages fail in my local bulk builds when
> testing the pkgtasks framework because of conflicting ownership
> information.  For example, x11/modular-xorg-server and
> x11/xkeyboard-config both set OWN_DIRS+=${VARBASE}/db/xkb.
> Arguably, only one of those packages should own that directory,
> but right now the only thing that happens is that when
> modular-xorg-server is removed and /var/db/xdb is not empty, then
> the user is (incorrectly) prompted to remove that diretory even
> though xkeyboard-config is still using that directory.
> 
> Which semantics are preferable for packages?  Just warning if an
> owned directory is not empty and should be removed by the user,
> or true ownership of the directory by a package responsible for
> the lifetime of that directory?

Another option is to just refcount the directories and only warn
if the refcount is zero but the directory can't be removed because
it's not empty.  This is probably the cleanest option, and we get
rid of the concept of OWN_DIRS entirely.

Regards,
-- 
Johnny C. Lam
jlam%NetBSD.org@localhost


Home | Main Index | Thread Index | Old Index