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