Bug 59909 - patch to obviate many PLIST files
Summary: patch to obviate many PLIST files
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-02 22:10 UTC by Trevor Johnson
Modified: 2004-01-20 19:18 UTC (History)
0 users

See Also:


Attachments
file.diff (2.01 KB, patch)
2003-12-02 22:10 UTC, Trevor Johnson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trevor Johnson freebsd_committer freebsd_triage 2003-12-02 22:10:12 UTC
This patch to bsd.port.mk is intended to reduce the need for PLIST
files.  These files account for much of the size of the ports
collection, in both inodes and bytes.  Today there are 9122 pkg-plist
files (including 8 that are empty) and the largest 5 occupy 2800 kB.
There are 881 which consist of a single line of the form
"bin/PORTNAME" so this patch provides a default which makes it
possible to simply remove those PLIST files.  It also provides two
makefile variables:  PLD, a list of directories for the packing
list; and PLF, files and symbolic links.  These variables can augment
or replace the PLIST file.  They make it easier to implement
conditional packing lists.

I have not made any special provision for packing lists which contain
@exec/@unexec scripts.  Those can be left as-is or used in conjuction
with the PLD and PLF variables.

As an example, these 8 lines which add 256 bytes to
ports/audio/aumix/Makefile can replace its 23-line, 658-byte PLIST
file:

-- begin example --
PLD=	share/aumix
PLF=	bin/aumix bin/mute bin/xaumix
.for ii in ansi aumix.xpm fadein.set fadeout.set vt100 xterm
PLF+=	share/aumix/${ii}
.endfor
.for ii in de el es fr gl ja nl pl pt_BR ru sv uk zh_CN
PLF+=	share/locale/${ii}/LC_MESSAGES/aumix.mo
.endfor
-- end example --

Here is the resulting work/.PLIST.mktmp:

-- begin .PLIST.mktmp --
bin/aumix
bin/mute
bin/xaumix
share/aumix/ansi
share/aumix/aumix.xpm
share/aumix/fadein.set
share/aumix/fadeout.set
share/aumix/vt100
share/aumix/xterm
share/locale/de/LC_MESSAGES/aumix.mo
share/locale/el/LC_MESSAGES/aumix.mo
share/locale/es/LC_MESSAGES/aumix.mo
share/locale/fr/LC_MESSAGES/aumix.mo
share/locale/gl/LC_MESSAGES/aumix.mo
share/locale/ja/LC_MESSAGES/aumix.mo
share/locale/nl/LC_MESSAGES/aumix.mo
share/locale/pl/LC_MESSAGES/aumix.mo
share/locale/pt_BR/LC_MESSAGES/aumix.mo
share/locale/ru/LC_MESSAGES/aumix.mo
share/locale/sv/LC_MESSAGES/aumix.mo
share/locale/uk/LC_MESSAGES/aumix.mo
share/locale/zh_CN/LC_MESSAGES/aumix.mo
man/man1/aumix.1.gz
man/man1/xaumix.1.gz
@unexec rm -f %D/man/cat1/aumix.1 %D/man/cat1/aumix.1.gz
@unexec rm -f %D/man/cat1/xaumix.1 %D/man/cat1/xaumix.1.gz
@dirrm share/aumix
@unexec if [ -f %D/info/dir ]; then if sed -e '1,/Menu:/d' %D/info/dir | grep -q '^[*] '; then true; else rm %D/info/dir; fi; fi
-- end .PLIST.mktmp --

Fix: also at http://people.freebsd.org/~trevor/ports/pld-plf.diff
How-To-Repeat: 	Extract ports tarball onto a hard disk.
Comment 1 Trevor Johnson freebsd_committer freebsd_triage 2003-12-02 22:19:33 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

patch to bsd.port.mk
Comment 2 Sergey Matveychuk 2004-01-14 08:55:39 UTC
I think PLD and PLF names is quite cryptic.

-- 
Sem.
Comment 3 Joe Marcus Clarke freebsd_committer freebsd_triage 2004-01-15 07:36:13 UTC
State Changed
From-To: open->analyzed

I've added this to the current test cycle on bento, but I made one change. 
I removed the early test for ${PLIST} and default assignment to 
${PLIST_FILES}.  I feel this will break plists that are currently dynamically 
generated.
Comment 4 Joe Marcus Clarke freebsd_committer freebsd_triage 2004-01-20 19:17:47 UTC
State Changed
From-To: analyzed->closed

Committed with a few modifications, thanks!