Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13405 - in main/branches/prefix: bin man pym/portage pym/repoman
Date: Tue, 28 Apr 2009 19:03:05
Message-Id: E1Lysa6-0003AR-Jz@stork.gentoo.org
1 Author: grobian
2 Date: 2009-04-28 19:03:01 +0000 (Tue, 28 Apr 2009)
3 New Revision: 13405
4
5 Modified:
6 main/branches/prefix/bin/ebuild.sh
7 main/branches/prefix/bin/repoman
8 main/branches/prefix/man/repoman.1
9 main/branches/prefix/man/xpak.5
10 main/branches/prefix/pym/portage/__init__.py
11 main/branches/prefix/pym/repoman/checks.py
12 main/branches/prefix/pym/repoman/errors.py
13 Log:
14 Merged from trunk -r13400:13404
15
16 | 13401 | Add a new EAPI.definition check for cases in which EAPI is |
17 | zmedico | defined after an inherit call. Thanks to Markus Meier |
18 | | <maekke@g.o> for the initial patch. |
19
20 | 13402 | fix e-mail munging and add see also section |
21 | SpankMan | |
22
23 | 13403 | Bug #71646 - Don't allow the HISTFILE variable into the |
24 | zmedico | ebuild environment since it triggers sandbox violations. |
25
26 | 13404 | Put ebuild helpers at the absolute front of the PATH. |
27 | zmedico | |
28
29
30 Modified: main/branches/prefix/bin/ebuild.sh
31 ===================================================================
32 --- main/branches/prefix/bin/ebuild.sh 2009-04-28 08:03:28 UTC (rev 13404)
33 +++ main/branches/prefix/bin/ebuild.sh 2009-04-28 19:03:01 UTC (rev 13405)
34 @@ -71,10 +71,14 @@
35 # Unset some variables that break things.
36 unset GZIP BZIP BZIP2 CDPATH GREP_OPTIONS GREP_COLOR GLOBIGNORE
37
38 -#export PATH="/usr/local/sbin:/sbin:/usr/sbin:$PORTAGE_BIN_PATH/ebuild-helpers:/usr/local/bin:/bin:/usr/bin:${ROOTPATH}"
39 +ROOTPATH=${ROOTPATH##:}
40 +ROOTPATH=${ROOTPATH%%:}
41 +PREROOTPATH=${PREROOTPATH##:}
42 +PREROOTPATH=${PREROOTPATH%%:}
43 +#PATH=$PORTAGE_BIN_PATH/ebuild-helpers:$PREROOTPATH${PREROOTPATH:+:}/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin${ROOTPATH:+:}$ROOTPATH
44 # PREFIX: we deviate in path order, should we split up DEFAULT_PATH?
45 -export PATH="${DEFAULT_PATH}:$PORTAGE_BIN_PATH/ebuild-helpers:${ROOTPATH}"
46 -[ ! -z "$PREROOTPATH" ] && export PATH="${PREROOTPATH%%:}:$PATH"
47 +PATH="$PORTAGE_BIN_PATH/ebuild-helpers:$PREROOTPATH${PREROOTPATH:+:}${DEFAULT_PATH}:${ROOTPATH:+:}$ROOTPATH"
48 +export PATH
49
50 source "${PORTAGE_BIN_PATH}/isolated-functions.sh" &>/dev/null
51
52 @@ -1632,7 +1636,7 @@
53 SANDBOX_DEBUG_LOG SANDBOX_DISABLED SANDBOX_LIB
54 SANDBOX_LOG SANDBOX_ON"
55 filtered_vars="${readonly_bash_vars} ${READONLY_PORTAGE_VARS}
56 - BASH_.* PATH POSIXLY_CORRECT"
57 + BASH_.* HISTFILE PATH POSIXLY_CORRECT"
58 if hasq --filter-sandbox $* ; then
59 filtered_vars="${filtered_vars} SANDBOX_.*"
60 else
61 @@ -1925,10 +1929,9 @@
62 ;;
63 esac
64
65 - #export PATH="/usr/local/sbin:/sbin:/usr/sbin:${ebuild_helpers_path}:/usr/local/bin:/bin:/usr/bin:${ROOTPATH}"
66 + #PATH=$ebuild_helpers_path:$PREROOTPATH${PREROOTPATH:+:}/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin${ROOTPATH:+:}$ROOTPATH
67 # PREFIX: same deviation as at the top of this file
68 - export PATH="${DEFAULT_PATH}:${ebuild_helpers_path}:${ROOTPATH}"
69 - [[ -n $PREROOTPATH ]] && export PATH="${PREROOTPATH%%:}:$PATH"
70 + PATH="$ebuild_helpers_path:$PREROOTPATH${PREROOTPATH:+:}${DEFAULT_PATH}${ROOTPATH:+:}$ROOTPATH"
71 unset ebuild_helpers_path
72
73 if ! hasq $EBUILD_SH_ARGS clean depend help info nofetch ; then
74
75 Modified: main/branches/prefix/bin/repoman
76 ===================================================================
77 --- main/branches/prefix/bin/repoman 2009-04-28 08:03:28 UTC (rev 13404)
78 +++ main/branches/prefix/bin/repoman 2009-04-28 19:03:01 UTC (rev 13405)
79 @@ -264,6 +264,7 @@
80 "LICENSE.missing":"Ebuilds that have a missing or empty LICENSE variable",
81 "DESCRIPTION.missing":"Ebuilds that have a missing or empty DESCRIPTION variable",
82 "DESCRIPTION.toolong":"DESCRIPTION is over %d characters" % max_desc_len,
83 + "EAPI.definition":"EAPI is defined after an inherit call (must be defined before)",
84 "EAPI.incompatible":"Ebuilds that use features that are only available with a different EAPI",
85 "EAPI.unsupported":"Ebuilds that have an unsupported EAPI version (you must upgrade portage)",
86 "SLOT.missing":"Ebuilds that have a missing or empty SLOT variable",
87
88 Modified: main/branches/prefix/man/repoman.1
89 ===================================================================
90 --- main/branches/prefix/man/repoman.1 2009-04-28 08:03:28 UTC (rev 13404)
91 +++ main/branches/prefix/man/repoman.1 2009-04-28 19:03:01 UTC (rev 13405)
92 @@ -105,6 +105,9 @@
93 .B DESCRIPTION.missing
94 Ebuilds that have a missing or empty DESCRIPTION variable
95 .TP
96 +.B EAPI.definition
97 +EAPI is defined after an inherit call (must be defined before)
98 +.TP
99 .B EAPI.incompatible
100 Ebuilds that use features that are only available with a different EAPI
101 .TP
102
103 Modified: main/branches/prefix/man/xpak.5
104 ===================================================================
105 --- main/branches/prefix/man/xpak.5 2009-04-28 08:03:28 UTC (rev 13404)
106 +++ main/branches/prefix/man/xpak.5 2009-04-28 19:03:01 UTC (rev 13405)
107 @@ -187,4 +187,8 @@
108 |<-----dataN_offset----->|<--dataN_len->|
109 |<data1data2data3data...>|<data-we-want>|
110 .SH AUTHORS
111 -Lars Hartmann <lars<at>chaotika<dot>org>
112 +Lars Hartmann <lars@××××××××.org>
113 +.SH "SEE ALSO"
114 +.BR qtbz2 (1),
115 +.BR quickpkg (1),
116 +.BR qxpak (1)
117
118 Modified: main/branches/prefix/pym/portage/__init__.py
119 ===================================================================
120 --- main/branches/prefix/pym/portage/__init__.py 2009-04-28 08:03:28 UTC (rev 13404)
121 +++ main/branches/prefix/pym/portage/__init__.py 2009-04-28 19:03:01 UTC (rev 13405)
122 @@ -1134,7 +1134,7 @@
123
124 # variables that break bash
125 _environ_filter += [
126 - "POSIXLY_CORRECT",
127 + "HISTFILE", "POSIXLY_CORRECT",
128 ]
129
130 # portage config variables and variables set directly by portage
131
132 Modified: main/branches/prefix/pym/repoman/checks.py
133 ===================================================================
134 --- main/branches/prefix/pym/repoman/checks.py 2009-04-28 08:03:28 UTC (rev 13404)
135 +++ main/branches/prefix/pym/repoman/checks.py 2009-04-28 19:03:01 UTC (rev 13405)
136 @@ -213,6 +213,23 @@
137 elif self.method_re.match(line):
138 self.check_next_line = True
139
140 +class EapiDefinition(LineCheck):
141 + """ Check that EAPI is defined before inherits"""
142 + repoman_check_name = 'EAPI.definition'
143 +
144 + eapi_re = re.compile(r'^EAPI=')
145 + inherit_re = re.compile(r'^\s*inherit\s')
146 +
147 + def new(self, pkg):
148 + self.inherit_line = None
149 +
150 + def check(self, num, line):
151 + if self.eapi_re.match(line) is not None:
152 + if self.inherit_line is not None:
153 + return errors.EAPI_DEFINED_AFTER_INHERIT
154 + elif self.inherit_re.match(line) is not None:
155 + self.inherit_line = line
156 +
157 class EbuildPatches(LineCheck):
158 """Ensure ebuilds use bash arrays for PATCHES to ensure white space safety"""
159 repoman_check_name = 'ebuild.patches'
160 @@ -349,7 +366,7 @@
161 EbuildHeader, EbuildWhitespace, EbuildQuote,
162 EbuildAssignment, EbuildUselessDodoc,
163 EbuildUselessCdS, EbuildNestedDie,
164 - EbuildPatches, EbuildQuotedA,
165 + EbuildPatches, EbuildQuotedA, EapiDefinition,
166 IUseUndefined, ImplicitRuntimeDeps, InheritAutotools,
167 EMakeParallelDisabled, EMakeParallelDisabledViaMAKEOPTS,
168 DeprecatedBindnowFlags, WantAutoDefaultValue)))
169
170 Modified: main/branches/prefix/pym/repoman/errors.py
171 ===================================================================
172 --- main/branches/prefix/pym/repoman/errors.py 2009-04-28 08:03:28 UTC (rev 13404)
173 +++ main/branches/prefix/pym/repoman/errors.py 2009-04-28 19:03:01 UTC (rev 13405)
174 @@ -16,3 +16,4 @@
175 EMAKE_PARALLEL_DISABLED = 'Upstream parallel compilation bug (ebuild calls emake -j1 on line: %d)'
176 EMAKE_PARALLEL_DISABLED_VIA_MAKEOPTS = 'Upstream parallel compilation bug (MAKEOPTS=-j1 on line: %d)'
177 DEPRECATED_BINDNOW_FLAGS = 'Deprecated bindnow-flags call on line: %d'
178 +EAPI_DEFINED_AFTER_INHERIT = 'EAPI defined after inherit on line: %d'