Date: Fri, 23 Mar 2012 20:14:50 +0000 From: Chris Rees <utisoft@gmail.com> To: ports@freebsd.org Subject: How useful is %%DATADIR%%, anyway? Message-ID: <CADLo839cUtxHJNqYQtvaFSp9Jjg21Hsn0U7xiOS9JuGmkhETmg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo839cUtxHJNqYQtvaFSp9Jjg21Hsn0U7xiOS9JuGmkhETmg>