Subject: Re: Changes to reference count directories
To: Julio M. Merino Vidal <>
From: Johnny C. Lam <>
List: tech-pkg
Date: 01/26/2005 18:35:45
Julio M. Merino Vidal wrote:
> On Wed, Jan 26, 2005 at 03:32:58PM -0500, Johnny Lam wrote:
>>Johnny C. Lam wrote:
>>>Reference count directories so that we know when it's safe to remove
>>>a directory without impacting the remaining packages.  The reference
>>>counts are stored in /var/db/pkgdir.  The install scripts are also
>>>extended to allow for easy sanity-checking and fixing of the directories
>>>present in the filesystem.
>>Due to feedback, I'm moving the location of the reference count database 
>>to ${PKG_DBDIR}/.refcount.  The name of the directory may not be 
>>changed, but the path to the directory now defaults to ${PKG_DBDIR}, 
>>which defaults to /var/db/pkg on most systems.  This should also do the 
>>right thing on bootstrapped systems, since PKG_DBDIR is set within 
>>/etc/mk.conf on those systems.
> So if one has multiple LOCALBASEs, he will have to manually change its
> location to a place where it can be globally accessed, right?  (Not that
> I have anything about it, just to make it sure.)

Not multiple LOCALBASEs, but multiple PKG_DBDIRs, as in the case with a 
system that mixes "pkgviews" and "overwrite" packages.

> By the way, having the ability to change the name could be good... if I
> move it outside ${PKG_DBDIR} (as I'd want to do in the previous situation),
> it'd be nice if it didn't end up being hidden.  I.e., /var/db/.refcount
> could be better without the dot.  (IMVHO)

I'm leaving it hard-coded for now so that the refcount database is at a 
well-known location.  If it ends up being a problem later, we can 
resurrect PKG_REFCOUNT_DIR and it's easy to supply a script to fix the 
+DIRS scripts for installed packages.  I'm trying to avoid supporting 
Yet Another Directory Variation in pkgsrc unless I'm forced into it.


	-- Johnny Lam <>