From owner-freebsd-ports@FreeBSD.ORG Mon Jul 16 15:36:33 2007 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 069E316A400 for ; Mon, 16 Jul 2007 15:36:33 +0000 (UTC) (envelope-from pauls@utdallas.edu) Received: from smtp3.utdallas.edu (smtp3.utdallas.edu [129.110.10.49]) by mx1.freebsd.org (Postfix) with ESMTP id DCB6213C494 for ; Mon, 16 Jul 2007 15:36:32 +0000 (UTC) (envelope-from pauls@utdallas.edu) Received: from utd59514.utdallas.edu (utd59514.utdallas.edu [129.110.3.28]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp3.utdallas.edu (Postfix) with ESMTP id 5FB81654A6 for ; Mon, 16 Jul 2007 10:36:32 -0500 (CDT) Date: Mon, 16 Jul 2007 10:36:32 -0500 From: Paul Schmehl To: freebsd-ports@freebsd.org Message-ID: X-Mailer: Mulberry/4.0.6 (Linux/x86) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=sha1; protocol="application/pkcs7-signature"; boundary="==========692E68F28E279B238A38==========" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Continued pkg-plist problems 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: Mon, 16 Jul 2007 15:36:33 -0000 --==========692E68F28E279B238A38========== Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I'm working on an upgrade to security/bro. The new version is requires=20 that I install a perl module in SITE_PERL so that the configuration script=20 will run correctly. When I tried to add the module to pkg-plist, the=20 deletion of the file failed because deinstall was prepending PREFIX to=20 SITE_PERL, making the path invalid. To get around this problem I wrote a one line pkg-deinstall script that=20 deletes the file. The script does what you would expect, but then it=20 returns an error. root@utd59514# find /usr/local/lib/perl5/ -name IP4.pm /usr/local/lib/perl5/site_perl/5.8.8/mach/IP4.pm root@utd59514# make deinstall PREFIX=3D/var/tmp/$(make -V PORTNAME) =3D=3D=3D> Deinstalling for security/bro =3D=3D=3D> Deinstalling bro-1.1d rm: /usr/local/lib/perl5/site_perl/5.8.8/mach/IP4.pm: No such file or=20 directory pkg_delete: post-deinstall script returned error status root@utd59514# find /usr/local/lib/perl5/ -name IP4.pm As you can see, the file was removed, but the script returns an error. If=20 I manually copy the module to SITE_PERL and then manually run=20 pkg-deinstall, the module is removed with no errors. What the heck is causing this error message? Here's the pkg-deinstall script: root@utd59514# less files/pkg-deinstall.in #!/bin/sh # Since pkg-plist prepends PREFIX to SITE_PERL, # we can't remove this file in the normal way /bin/rm %%SITE_PERL%%/mach/IP4.pm It's listed in the Makefile as one of the SUB_FILES, and SUB_LIST includes=20 SITE_PERL=3D${SITE_PERL). --=20 Paul Schmehl (pauls@utdallas.edu) Senior Information Security Analyst The University of Texas at Dallas http://www.utdallas.edu/ir/security/ --==========692E68F28E279B238A38==========--