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

Re: dpkg can't remove directories



On Tue, 2002-06-11 at 13:45, grante@visi.com wrote:
> How does dpkg decide which files it "knows about"?  dpkg -L
> lists all of them after the install, and  dpkg -c lists them in
> the .deb file.

dpkg knows about any conffiles, it doesn't know about any config files.

Config files (as opposed to conffiles) are created in the package
maintainer scripts, and not by dpkg.

So if dpkg -c lists them, it should know about them, and remove them
when you purge the package.

> > Personally, I wish that there was a better way of keeping track of these
> > files, but currently there isn't[1].
> 
> dpkg is keeping track of them.  It knows they're there, and it
> knows what package they belong to.  And it seems to delete the
> files (the directories _are_ empty when I go look at them).

Are you sure that there weren't any files in this directory that were
deleted at some stage, eg. by the operator or maintainer scripts?

> I can delete them in a pre-remove script, but how do I know
> which files I have to delete and which ones dpkg will take care
> of?

Actually, you should delete config files only in the post-remove script
and only if the package is being purged (I don't think the pre-remove
script is called when purging).
-- 
Brian May <bam@snoopy.apana.org.au>


-- 
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: