Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/portage: portage-2.1.11.23.ebuild ChangeLog portage-2.1.11.21.ebuild
Date: Thu, 27 Sep 2012 22:04:48
Message-Id: 20120927220433.3936521600@flycatcher.gentoo.org
1 zmedico 12/09/27 22:04:33
2
3 Modified: ChangeLog
4 Added: portage-2.1.11.23.ebuild
5 Removed: portage-2.1.11.21.ebuild
6 Log:
7 2.1.11.23 version bump. This fixes bug #436330 (extended atom syntax in
8 /etc/portage/profile) and bug #436334 (intermittent test failure in
9 test_ipc_daemon, triggered by heavy load). Bug #431026 tracks all bugs
10 fixed since portage-2.1.11.9.
11
12 (Portage version: 2.2.0_alpha134/cvs/Linux i686)
13
14 Revision Changes Path
15 1.1109 sys-apps/portage/ChangeLog
16
17 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1109&view=markup
18 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1109&content-type=text/plain
19 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.1108&r2=1.1109
20
21 Index: ChangeLog
22 ===================================================================
23 RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v
24 retrieving revision 1.1108
25 retrieving revision 1.1109
26 diff -u -r1.1108 -r1.1109
27 --- ChangeLog 26 Sep 2012 04:31:38 -0000 1.1108
28 +++ ChangeLog 27 Sep 2012 22:04:33 -0000 1.1109
29 @@ -1,6 +1,15 @@
30 # ChangeLog for sys-apps/portage
31 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
32 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1108 2012/09/26 04:31:38 zmedico Exp $
33 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1109 2012/09/27 22:04:33 zmedico Exp $
34 +
35 +*portage-2.1.11.23 (27 Sep 2012)
36 +
37 + 27 Sep 2012; Zac Medico <zmedico@g.o> +portage-2.1.11.23.ebuild,
38 + -portage-2.1.11.21.ebuild:
39 + 2.1.11.23 version bump. This fixes bug #436330 (extended atom syntax in
40 + /etc/portage/profile) and bug #436334 (intermittent test failure in
41 + test_ipc_daemon, triggered by heavy load). Bug #431026 tracks all bugs fixed
42 + since portage-2.1.11.9.
43
44 *portage-2.2.0_alpha133 (26 Sep 2012)
45
46
47
48
49 1.1 sys-apps/portage/portage-2.1.11.23.ebuild
50
51 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.11.23.ebuild?rev=1.1&view=markup
52 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.11.23.ebuild?rev=1.1&content-type=text/plain
53
54 Index: portage-2.1.11.23.ebuild
55 ===================================================================
56 # Copyright 1999-2012 Gentoo Foundation
57 # Distributed under the terms of the GNU General Public License v2
58 # $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.11.23.ebuild,v 1.1 2012/09/27 22:04:33 zmedico Exp $
59
60 # Require EAPI 2 since we now require at least python-2.6 (for python 3
61 # syntax support) which also requires EAPI 2.
62 EAPI=2
63 inherit eutils python
64
65 DESCRIPTION="Portage is the package management and distribution system for Gentoo"
66 HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
67 LICENSE="GPL-2"
68 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
69 SLOT="0"
70 IUSE="build doc epydoc +ipc linguas_pl pypy1_9 python2 python3 selinux xattr"
71
72 # Import of the io module in python-2.6 raises ImportError for the
73 # thread module if threading is disabled.
74 python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
75 !pypy1_9? ( !python2? ( !python3? (
76 || ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
77 ) ) )
78 pypy1_9? ( !python2? ( !python3? ( dev-python/pypy:1.9[bzip2,ssl] ) ) )
79 python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
80 python_dep="${python_dep_ssl//\[ssl\]}"
81 python_dep="${python_dep//,ssl}"
82 python_dep="${python_dep//ssl,}"
83
84 # The pysqlite blocker is for bug #282760.
85 DEPEND="${python_dep}
86 >=sys-apps/sed-4.0.5 sys-devel/patch
87 doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
88 epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
89 # Require sandbox-2.2 for bug #288863.
90 # For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
91 # quite slow, so it's not considered in the dependencies as an alternative to
92 # to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
93 # for now, don't pull in xattr deps for other kernels.
94 # For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
95 RDEPEND="${python_dep}
96 !build? ( >=sys-apps/sed-4.0.5
97 >=app-shells/bash-3.2_p17
98 >=app-admin/eselect-1.2
99 || ( ${python_dep_ssl} dev-python/python-mhash )
100 )
101 elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
102 elibc_glibc? ( >=sys-apps/sandbox-2.2 )
103 elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
104 >=app-misc/pax-utils-0.1.17
105 xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
106 selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
107 !<app-shells/bash-3.2_p17
108 !<app-admin/logrotate-3.8.0"
109 PDEPEND="
110 !build? (
111 >=net-misc/rsync-2.6.4
112 userland_GNU? ( >=sys-apps/coreutils-6.4 )
113 )"
114 # coreutils-6.4 rdep is for date format in emerge-webrsync #164532
115 # NOTE: FEATURES=install-sources requires debugedit and rsync
116
117 SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
118
119 prefix_src_archives() {
120 local x y
121 for x in ${@}; do
122 for y in ${SRC_ARCHIVES}; do
123 echo ${y}/${x}
124 done
125 done
126 }
127
128 PV_PL="2.1.2"
129 PATCHVER_PL=""
130 TARBALL_PV=$PV
131 SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
132 $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
133 linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
134 $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
135
136 PATCHVER=
137 [[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
138 if [ -n "${PATCHVER}" ]; then
139 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
140 $(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
141 fi
142
143 S="${WORKDIR}"/${PN}-${TARBALL_PV}
144 S_PL="${WORKDIR}"/${PN}-${PV_PL}
145
146 compatible_python_is_selected() {
147 [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
148 }
149
150 current_python_has_xattr() {
151 [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
152 /usr/bin/python -c 'import xattr' 2>/dev/null
153 }
154
155 pkg_setup() {
156 if use python2 && use python3 ; then
157 ewarn "Both python2 and python3 USE flags are enabled, but only one"
158 ewarn "can be in the shebangs. Using python3."
159 fi
160 if use pypy1_9 && use python3 ; then
161 ewarn "Both pypy1_9 and python3 USE flags are enabled, but only one"
162 ewarn "can be in the shebangs. Using python3."
163 fi
164 if use pypy1_9 && use python2 ; then
165 ewarn "Both pypy1_9 and python2 USE flags are enabled, but only one"
166 ewarn "can be in the shebangs. Using python2"
167 fi
168 if ! use pypy1_9 && ! use python2 && ! use python3 && \
169 ! compatible_python_is_selected ; then
170 ewarn "Attempting to select a compatible default python interpreter"
171 local x success=0
172 for x in /usr/bin/python2.* ; do
173 x=${x#/usr/bin/python2.}
174 if [[ $x -ge 6 ]] 2>/dev/null ; then
175 eselect python set python2.$x
176 if compatible_python_is_selected ; then
177 elog "Default python interpreter is now set to python-2.$x"
178 success=1
179 break
180 fi
181 fi
182 done
183 if [ $success != 1 ] ; then
184 eerror "Unable to select a compatible default python interpreter!"
185 die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
186 fi
187 fi
188
189 if use python3; then
190 python_set_active_version 3
191 elif use python2; then
192 python_set_active_version 2
193 elif use pypy1_9; then
194 python_set_active_version 2.7-pypy-1.9
195 fi
196 }
197
198 src_prepare() {
199 if [ -n "${PATCHVER}" ] ; then
200 if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
201 rm "$S/bin/ebuild-helpers/portageq" \
202 || die "failed to remove portageq helper symlink"
203 fi
204 epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
205 fi
206 einfo "Setting portage.VERSION to ${PVR} ..."
207 sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
208 die "Failed to patch portage.VERSION"
209 sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
210 die "Failed to patch VERSION in doc/fragment/version"
211 sed -e "1s/VERSION/${PVR}/" -i man/* || \
212 die "Failed to patch VERSION in man page headers"
213
214 if ! use ipc ; then
215 einfo "Disabling ipc..."
216 sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
217 -i pym/_emerge/AbstractEbuildProcess.py || \
218 die "failed to patch AbstractEbuildProcess.py"
219 fi
220
221 if use xattr && use kernel_linux ; then
222 einfo "Adding FEATURES=xattr to make.globals ..."
223 echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
224 || die "failed to append to make.globals"
225 fi
226
227 if use python3; then
228 einfo "Converting shebangs for python3..."
229 python_convert_shebangs -r 3 .
230 elif use python2; then
231 einfo "Converting shebangs for python2..."
232 python_convert_shebangs -r 2 .
233 elif use pypy1_9; then
234 einfo "Converting shebangs for pypy-c1.9..."
235 python_convert_shebangs -r 2.7-pypy-1.9 .
236 fi
237
238 cd "${S}/cnf" || die
239 if [ -f "make.conf.${ARCH}".diff ]; then
240 patch make.conf "make.conf.${ARCH}".diff || \
241 die "Failed to patch make.conf.example"
242 else
243 eerror ""
244 eerror "Portage does not have an arch-specific configuration for this arch."
245 eerror "Please notify the arch maintainer about this issue. Using generic."
246 eerror ""
247 fi
248 }
249
250 src_compile() {
251 if use doc; then
252 emake docbook || die
253 fi
254
255 if use epydoc; then
256 einfo "Generating api docs"
257 emake epydoc || die
258 fi
259 }
260
261 src_test() {
262 emake test || die
263 }
264
265 src_install() {
266 emake DESTDIR="${D}" \
267 sysconfdir="/etc" \
268 prefix="/usr" \
269 install || die
270
271 # Extended set config is currently disabled in portage-2.1.x.
272 rm -rf "${D}/usr/share/portage/config/sets" || die
273
274 # Use dodoc for compression, since the Makefile doesn't do that.
275 dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
276
277 if use linguas_pl; then
278 doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
279 doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
280 fi
281
282 # Set PYTHONPATH for portage API consumers. This way we don't have
283 # to rely on patched python having the correct path, since it has
284 # been known to incorrectly add /usr/libx32/portage/pym to sys.path.
285 echo "PYTHONPATH=/usr/lib/portage/pym" > \
286 "${T}/05portage" || die
287 doenvd "${T}/05portage" || die
288 }
289
290 pkg_preinst() {
291 if [[ $ROOT == / ]] ; then
292 # Run some minimal tests as a sanity check.
293 local test_runner=$(find "$D" -name runTests)
294 if [[ -n $test_runner && -x $test_runner ]] ; then
295 einfo "Running preinst sanity tests..."
296 "$test_runner" || die "preinst sanity tests failed"
297 fi
298 fi
299
300 if use xattr && ! current_python_has_xattr ; then
301 ewarn "For optimal performance in xattr handling, install"
302 ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
303 ewarn "enable USE=python3 for $CATEGORY/$PN."
304 fi
305
306 if ! use build && ! has_version dev-python/pycrypto && \
307 ! has_version '>=dev-lang/python-2.6[ssl]' ; then
308 ewarn "If you are an ebuild developer and you plan to commit ebuilds"
309 ewarn "with this system then please install dev-python/pycrypto or"
310 ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order"
311 ewarn "to enable RMD160 hash support."
312 ewarn "See bug #198398 for more information."
313 fi
314
315 if [[ -d ${ROOT}var/log/portage && \
316 $(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
317 has_version '<sys-apps/portage-2.1.10.11' ; then
318 # Initialize permissions for bug #378451 and bug #377177, since older
319 # portage does not create /var/log/portage with the desired default
320 # permissions.
321 einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
322 chown portage:portage "${ROOT}var/log/portage"
323 chmod g+ws "${ROOT}var/log/portage"
324 fi
325
326 if has_version '<sys-apps/portage-2.1.10.61' ; then
327 ewarn "FEATURES=config-protect-if-modified is now enabled by default."
328 ewarn "This causes the CONFIG_PROTECT behavior to be skipped for"
329 ewarn "files that have not been modified since they were installed."
330 fi
331 }
332
333 pkg_postinst() {
334 # Compile all source files recursively. Any orphans
335 # will be identified and removed in postrm.
336 python_mod_optimize /usr/lib/portage/pym
337 }
338
339 pkg_postrm() {
340 python_mod_cleanup /usr/lib/portage/pym
341 }