Date: Wed, 30 Aug 2006 11:10:10 -0500 From: Jim Pirzyk <pirzyk@FreeBSD.org> To: Emanuel Haupt <ehaupt@FreeBSD.org> Cc: ports@FreeBSD.org Subject: Re: [ports-i386@pointyhat.freebsd.org: psgconf-3.2.1 pkg-plist errors on i386 6-exp] Message-ID: <246FDD84-4764-4D97-BD3E-A23CBCD76C01@FreeBSD.org> In-Reply-To: <20060830174737.79704436.ehaupt@FreeBSD.org> References: <20060825125030.GB73712@xor.obsecurity.org> <09A569F7-DFAA-4963-A1A8-935488F0C955@freebsd.org> <20060830174737.79704436.ehaupt@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have one written but I need to know if I am deinstalling a port or a package. The pkg-install script will install a file if it does not exist, the pkg-deinstall script will need to know if that file has changed before it just blindly removes it. The file gets written out differently if you do 'pkg_add' vs 'make install' To solve this, I was going to do this: pre-deinstall: PKG_PREFIX=${PREFIX} PKG_MGR=FreeBSD::Ports ${SH} $ {PKGDEINSTALL} ${PKGNAME} DEINSTALL So the pkg-deinstall script looks at PKG_MGR and if it is not set, then it assumes the string "FreeBSD::Packages". That string winds up in a file that is not being removed from the tinderbox, because the old code sees they are different. - - JimP On Aug 30, 2006, at 10:47 AM, Emanuel Haupt wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> I do not see any >> >> pre-deinstall: >> >> target available in bsd.ports.mk Is there a way I can have a >> custom action before the main deinstall script or do I have to >> reimplement the deinstall: target itself? > > You can write a pkg-deinstall script. > > See `find /usr/ports -name pkg-deinstall` for examples. > > Emanuel - --- @(#) $Id: dot.signature,v 1.14 2004/02/03 02:46:26 pirzyk Exp $ __o pirzyk@uiuc.edu --------------------------- jim@pirzyk.org _'\<,_ Systems Management Group, CITES (*)/ (*) University of Illinois at Urbana-Champaign -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (Darwin) iD8DBQFE9bho2EYx0U4j2soRAnVxAJ9nb5SvqPt9X/1fx7PEMR8KbpBpIgCgkqq2 gV4hfPloxGJMYkJtrBQ4go4= =fjnX -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?246FDD84-4764-4D97-BD3E-A23CBCD76C01>