From owner-freebsd-ports@FreeBSD.ORG Wed Aug 30 16:10:39 2006 Return-Path: X-Original-To: ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 87D7716A4DD; Wed, 30 Aug 2006 16:10:39 +0000 (UTC) (envelope-from pirzyk@FreeBSD.org) Received: from zoot.intenex.net (zoot.intenex.net [216.93.182.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4A9843D53; Wed, 30 Aug 2006 16:10:36 +0000 (GMT) (envelope-from pirzyk@FreeBSD.org) Received: from [192.17.25.126] (snoopy.ci.uiuc.edu [192.17.25.126]) (authenticated bits=0) by zoot.intenex.net (8.12.11.20060308/8.12.11) with ESMTP id k7UGAP7x018976 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Wed, 30 Aug 2006 09:10:26 -0700 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> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <246FDD84-4764-4D97-BD3E-A23CBCD76C01@FreeBSD.org> Content-Transfer-Encoding: 7bit From: Jim Pirzyk Date: Wed, 30 Aug 2006 11:10:10 -0500 To: Emanuel Haupt X-Pgp-Agent: GPGMail 1.1.1 (Tiger) X-Mailer: Apple Mail (2.752.2) X-Intenex-MailScanner-Information: Please contact Intenex support for more information X-Intenex-MailScanner: Found to be clean X-MailScanner-From: pirzyk@freebsd.org Cc: ports@FreeBSD.org Subject: Re: [ports-i386@pointyhat.freebsd.org: psgconf-3.2.1 pkg-plist errors on i386 6-exp] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2006 16:10:39 -0000 -----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-----