Subject: Re: pkg/30347: +DEINSTALL scripts are incomplete
To: None <jlam@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org>
From: Johnny C. Lam <jlam@NetBSD.org>
List: pkgsrc-bugs
Date: 05/27/2005 16:08:01
The following reply was made to PR pkg/30347; it has been noted by GNATS.
From: "Johnny C. Lam" <jlam@NetBSD.org>
To: reed@reedmedia.net
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/30347: +DEINSTALL scripts are incomplete
Date: Fri, 27 May 2005 12:08:13 -0400
reed@reedmedia.net wrote:
>
> This happens on systems where the packages are installed from binary
> packages.
>
> No messages are displayed when running pkg_delete and no config files,
> et cetera are cleaned up.
>
> +DEINSTALL files since early February don't list any filenames to
> remove and I don't see code to remove files. (In early February,
> many changes were done to the mk/install/ scripts.)
>
> I don't have any +FILES (or related) files. I see that pkg_add'ing
> a package runs +INSTALL which generates the +FILES (I think in a
> temporary staging directory).
I can't reproduce this problem on my system. The way that binary
packages are installed is that the +INSTALL script runs the PRE-INSTALL
action to create the various +DIRS, +FILES, etc. sub-scripts within the
temporary directory, and then during the package registration, all of
the +* files are copied into /var/db/pkg/<pkgname>. The copying happens
in line 875 of pkg_install/files/add/perform.c. It works correctly on
my system:
pkg_comp:default.conf# pkg_info -V
20050204
pkg_comp:default.conf# pkg_add /p/packages/All/fam-2.7.0nb5.tgz
===========================================================================
Installing files needed by fam-2.7.0nb5:
/usr/pkg/etc/fam.conf
[/usr/pkg/share/examples/fam/fam.conf]
===========================================================================
===========================================================================
Installing files needed by fam-2.7.0nb5:
/etc/rc.d/famd
[/usr/pkg/share/examples/rc.d/famd]
===========================================================================
===========================================================================
$NetBSD: MESSAGE,v 1.4 2004/10/17 19:20:53 jmmv Exp $
Because FAM uses RPC, you have to add the following line to the system's
portmapper file (/etc/rpc):
sgi_fam 391002 fam # File Alteration Monitor
After that, restart the rpcbind(8) server.
Furthermore, you have to enable the FAM daemon. There are two ways to do
this: through inetd(8) or as a standalone server. If you prefer the former
way, add the following line to /etc/inetd.conf:
sgi_fam/1-2 stream rpc/tcp wait root /usr/pkg/sbin/famd famd
and reload inetd(8)'s daemon. However, if you prefer the later way, use
the provided famd rc.d(8) script.
===========================================================================
pkg_comp:default.conf# ls /var/db/pkg/fam-2.7.0nb5
+BUILD_INFO +CONTENTS +DIRS +INSTALL +SIZE_ALL
+BUILD_VERSION +DEINSTALL +DISPLAY +PERMS +SIZE_PKG
+COMMENT +DESC +FILES +RCD_SCRIPTS +USERGROUP
pkg_comp:default.conf# tail -2 /var/db/pkg/fam-2.7.0nb5/+FILES
# FILE: /usr/pkg/etc/fam.conf c /usr/pkg/share/examples/fam/fam.conf 0644
Cheers,
-- Johnny Lam <jlam@NetBSD.org>