Subject: Re: CONF_FILES and disappearing directories
To: Julio M. Merino Vidal <>
From: Eric Haszlakiewicz <>
List: tech-pkg
Date: 04/24/2004 20:33:01
On Sat, Apr 24, 2004 at 10:17:18AM +0200, Julio M. Merino Vidal wrote:
> Eric Haszlakiewicz wrote:
> >that first drew my attention was that pkg_delete was complaining that
> >it couldn't remove the conf directory.  However, when I went and looked to
> >see what was still in there, I found that the directory actually _had_
> >been removed.  Searching through the ktrace output, I discovered that
> >pkg_delete was removing it twice, and complaining when the second rmdir
> >failed.  I suppose that's one bug: it shouldn't complain, or at least 
> >complain
> >differently, when the directory is already gone.
> >	Looking further, I tracked the double rmdir down to whether or not
> >CONF_FILES was set.  It seems that something goes and removes any 
> >directories
> >that are empty in the path leading to the config files.  Is it supposed
> >to do that?  There's no mention of that behavior in
> Which package shows this behavior?  Files registered with CONF_FILES
> should be handled only by the install script, not the PLIST.  So it may
> be that the package giving you errors is simply broken (because it
> registers them from both places, thus giving the errors you see).

	The package is a new jakarta tomcat package that I'm creating.
	I am not getting errors on the conf files, but with the _directories_
that they reside in.  

Example: CONF_FILES has:
"${PREFIX}/tomcat4/conf/foo.default ${PREFIX}/tomcat4/conf/foo"

The PLIST contains lines that say:
@dirrm tomcat4/conf
@dirrm tomcat4

	Is the presence of the @dirrm lines wrong, or is the CONF_FILES code
doing the wrong thing by deleting the directory before the @dirrm runs?