From owner-freebsd-ports@FreeBSD.ORG Sun Mar 28 06:14:54 2010 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0116D106564A for ; Sun, 28 Mar 2010 06:14:54 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id CE43B8FC0A for ; Sun, 28 Mar 2010 06:14:53 +0000 (UTC) Received: by pvc7 with SMTP id 7so4266579pvc.13 for ; Sat, 27 Mar 2010 23:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=9T1gyoTGoSKaW5hFiR0dz3cpkA3+X2/QXK2yNUGihPo=; b=WLvnVO/jLepyy7s3+cvxZqK/mczad7P5w8TlXyei3c5D17ppnZWjHJbWztXC+9pBIw Zu56L5v+3GOLaoTNBs6xuwmusAyOUQ7u+A3FIxSTIc2vYoOU0CfNwN1Z3eA7HEmjZDEa 824xx8JehOkmFqXVCaOFD1+WposuhS2GBWEKc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=qvYBwCMHkpNippfzpKYMNyJHYWBmmGJNqUv8i1+fPo3m9+394/P+6NS1zFYG1cBMb2 e+S2Jf96bwS6RJzQjyze0E2Jh/OY50cpWwh/sPa6EBBgKuen+0ILajxXweoJuLB1mzBB FEP8PzdbtuLfofqzdh49fucDgmkne5yeTlhZQ= MIME-Version: 1.0 Received: by 10.143.8.14 with HTTP; Sat, 27 Mar 2010 23:14:53 -0700 (PDT) Date: Sat, 27 Mar 2010 23:14:53 -0700 Received: by 10.142.195.15 with SMTP id s15mr298800wff.287.1269756893188; Sat, 27 Mar 2010 23:14:53 -0700 (PDT) Message-ID: <7d6fde3d1003272314r25305a39mce9893e07453ef90@mail.gmail.com> From: Garrett Cooper To: FreeBSD Ports Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: [RFC] deprecate @exec and @unexec in plists in favor of pre-install and post-install scripts 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: Sun, 28 Mar 2010 06:14:54 -0000 Hi, As part of taking a look at the differences in our implementation of pkg_install(1) in order to afford an improvement over the existing code, I've looked at various implementations of pkg_install, one being NetBSD's evolution [1]. It's several years ahead from our's and while I don't believe that all of the complexity is desired, there's a lot of good lessons to be learned from this. One of which is that they replaced the @exec and @unexec calls with string pre-install // post-install and pre-deinstall // post-deinstall scripts. I think that this potentially is a good step forward because it takes some of the guts out of the +CONTENTS files and places it in [bourne shell] scripts, which are easier to maintain and potentially understand. I realize that some of the loss would be that one couldn't simply specify things like %f, %D, %F, etc with @exec and @unexec, but that seems a small price to pay for tuning everything a bit more. On the plus side too, that means that one could use an extensive set of shell, etc libraries that would avoid code duplication like what's present in the +CONTENTS files. This is one of the small observations I made after starting on work which would modify 1k python ports to not install the byte-compiled or optimized files (side topic that we can talk about in another thread if desired). Thoughts? -Garrett