From owner-freebsd-ports@FreeBSD.ORG Fri Mar 23 20:15:22 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7A131065670 for ; Fri, 23 Mar 2012 20:15:22 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 455E68FC12 for ; Fri, 23 Mar 2012 20:15:21 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so3872749bkc.13 for ; Fri, 23 Mar 2012 13:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=+52IXyIoEBsgBYiUn3Ncz1GW929NzGOQRoWCkkZXoeM=; b=X18gy7AW8bOjVoTDbW4Sff5PcE7MjIt1YQ0ur/gjpe6kzzAfExd+R1k393YBsI3PrY naBrHCbJEnhYd+Xc/1df54P4nln1luA3tRZmNbdA2PU83BTVZCbmx5M56z10XU4W+lG2 bsI1IbA3N6AFVyVGHmIi2flbfD2l9XNDlLPitmia85HiO1AQtSWwcnfSf3x2pEvdJhi+ 4wzNSXDK8DdUE8GDoG2kgMt5+nv+9iP7Dkw6GgUXdDYpMYQ/rXO/W56o4Exn19xLfXqP vsPLIgAUdVPVtaTcg7pcwMvBqET+DkH9oLOO1ls5I91nYyR7w8jz9u823Mo50xv4gEF0 8ZPw== Received: by 10.205.137.15 with SMTP id im15mr5099021bkc.54.1332533721068; Fri, 23 Mar 2012 13:15:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.202.142 with HTTP; Fri, 23 Mar 2012 13:14:50 -0700 (PDT) From: Chris Rees Date: Fri, 23 Mar 2012 20:14:50 +0000 Message-ID: To: ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: How useful is %%DATADIR%%, anyway? 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: Fri, 23 Mar 2012 20:15:22 -0000 Hi all, (tl;dr at the bottom) Just as a thought, I decided to try stripping out all mentions of %%DATADIR%%, %%DOCSDIR%% etc from pkg-plist, and replacing them with PORTDOCS=*, PORTDATA=* in the Makefiles etc. [crees@pegasus]/tmp/portss% df -h /tmp/ports* Filesystem Size Used Avail Capacity Mounted on dumpster/tmp/ports 20G 478M 19G 2% /tmp/ports dumpster/tmp/portss 20G 444M 19G 2% /tmp/portss [crees@pegasus]/tmp/portss% expr 444 - 478 -34 [crees@pegasus]/tmp/portss% expr 3400 / 478 # Calculate percentage space reduction 7 The main rationale for having files in static plists, as far as I can see is that one can grep the plists for files they've found lying around if pkg which doesn't come up with anything.... which is clearly useful for files in /usr/local/bin or similar. However, if a file is in DATADIR, it'll be in a directory called /usr/local/share/${PORTNAME}, so it's pointless keeping these files in plists for that reason alone. ======= tl;dr it saves about 34M, or 7% of the ports tree checkout if we use the PORTDOCS/DATA/EXAMPLES macros, which is definitely noticeable. I propose modifying the Porter's Handbook to discourage use of %%PORTDOCS%% etc in static plists, and encourage the use of PORTDOCS etc macros instead. No need to actually convert existing ports (large amount of churn), but as far as I can see, these lines are a waste of space and bandwidth. Anyone disagree? Chris