Gentoo Archives: gentoo-portage-dev

From: Michael Orlitzky <mjo@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [PATCH 2/2] man/make.conf.5: Document globbing for INSTALL_MASK.
Date: Sun, 19 Jul 2015 16:09:17
Message-Id: 1437322132-31827-3-git-send-email-mjo@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 0/2] Document globbing for INSTALL_MASK. by Michael Orlitzky
1 The INSTALL_MASK variable has long supported shell glob patterns, but
2 these were not mentioned in the man page. In fact there are two
3 different behaviors -- one for globs that the shell can expand, and
4 one for "bare globs" like "*.pdf". Both of these are now documented in
5 the man page.
6
7 In addition, a warning and example have been added to the man page
8 regarding spaces within filenames (patterns).
9 ---
10 man/make.conf.5 | 44 ++++++++++++++++++++++++++++++++++++--------
11 1 file changed, 36 insertions(+), 8 deletions(-)
12
13 diff --git a/man/make.conf.5 b/man/make.conf.5
14 index a7417f3..13b8042 100644
15 --- a/man/make.conf.5
16 +++ b/man/make.conf.5
17 @@ -699,14 +699,42 @@ These variables are used by network clients such as \fBwget\fR(1) and
18 \fBrsync\fR(1). They are only required if you use a
19 proxy server for internet access.
20 .TP
21 -\fBINSTALL_MASK\fR = \fI[space delimited list of file names]\fR
22 -Use this variable if you want to selectively prevent certain files from being
23 -copied into your file system tree. This does not work on symlinks, but only on
24 -actual files. Useful if you wish to filter out files like HACKING.gz and
25 -TODO.gz. The \fBINSTALL_MASK\fR is processed just before a package is merged.
26 -Also supported is a \fBPKG_INSTALL_MASK\fR variable that behaves exactly like
27 -\fBINSTALL_MASK\fR except that it is processed just before creation of a binary
28 -package.
29 +\fBINSTALL_MASK\fR = \fI[space delimited list of filename patterns (globs)]\fR
30 +Use this variable if you want to selectively prevent certain files
31 +from being copied into your file system tree. This does not work on
32 +symlinks, but only on actual files. Useful if you wish to filter out
33 +files like HACKING.gz and TODO.gz.
34 +
35 +Patterns are matched against both the absolute path and the bare
36 +filename of each file (or directory) to be installed.
37 +
38 +The \fBINSTALL_MASK\fR is processed just before a package is merged.
39 +Also supported is a \fBPKG_INSTALL_MASK\fR variable that behaves
40 +exactly like \fBINSTALL_MASK\fR except that it is processed just
41 +before creation of a binary package.
42 +
43 +\fB***warning***\fR
44 +.br
45 +This does not place nice with filenames containing spaces. If you
46 +supply a pattern with a space in it, that single pattern will be
47 +interpreted as two separate patterns.
48 +
49 +.I Examples:
50 +
51 +.nf
52 +# Prevent individual files from being installed.
53 +INSTALL_MASK="/usr/bin/zless /usr/bin/zzxorcat"
54 +
55 +# Prevent all PDF files from being installed.
56 +INSTALL_MASK="*.pdf"
57 +
58 +# Block PDF files one level beneath /usr/share/doc.
59 +INSTALL_MASK="/usr/share/doc/*/*.pdf"
60 +
61 +# Watch out! This will be interpreted as two patterns, and
62 +# prevent both "README" AND all PDF files from being installed.
63 +INSTALL_MASK="README\\ *.pdf"
64 +.fi
65 .TP
66 .B LDFLAGS
67 A list of flags to pass to the compiler when the linker will be called. See
68 --
69 2.3.6