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.2.0_alpha109.ebuild ChangeLog
Date: Sat, 02 Jun 2012 07:42:19
Message-Id: 20120602074153.ABE8A2004B@flycatcher.gentoo.org
1 zmedico 12/06/02 07:41:53
2
3 Modified: ChangeLog
4 Added: portage-2.2.0_alpha109.ebuild
5 Log:
6 2.2.0_alpha109 version bump. This includes all of the fixes in 2.1.10.64.
7 Bug #210077 tracks all bugs fixed since portage-2.1.x.
8
9 (Portage version: 2.2.0_alpha109/cvs/Linux i686)
10
11 Revision Changes Path
12 1.1027 sys-apps/portage/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1027&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1027&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.1026&r2=1.1027
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v
21 retrieving revision 1.1026
22 retrieving revision 1.1027
23 diff -u -r1.1026 -r1.1027
24 --- ChangeLog 2 Jun 2012 07:38:57 -0000 1.1026
25 +++ ChangeLog 2 Jun 2012 07:41:53 -0000 1.1027
26 @@ -1,11 +1,17 @@
27 # ChangeLog for sys-apps/portage
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1026 2012/06/02 07:38:57 zmedico Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1027 2012/06/02 07:41:53 zmedico Exp $
31 +
32 +*portage-2.2.0_alpha109 (02 Jun 2012)
33 +
34 + 02 Jun 2012; Zac Medico <zmedico@g.o> +portage-2.2.0_alpha109.ebuild:
35 + 2.2.0_alpha109 version bump. This includes all of the fixes in 2.1.10.64. Bug
36 + #210077 tracks all bugs fixed since portage-2.1.x.
37
38 *portage-2.1.10.64 (02 Jun 2012)
39
40 02 Jun 2012; Zac Medico <zmedico@g.o> +portage-2.1.10.64.ebuild:
41 - 2.1.10.63 version bump. This fixes bug #418309 (regression since 2.1.10.59 and
42 + 2.1.10.64 version bump. This fixes bug #418309 (regression since 2.1.10.59 and
43 2.2.0_alpha104 which triggers intermittent ecompressdir failures). Bug #409383
44 tracks all bugs fixed since portage-2.1.10.49.
45
46
47
48
49 1.1 sys-apps/portage/portage-2.2.0_alpha109.ebuild
50
51 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha109.ebuild?rev=1.1&view=markup
52 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha109.ebuild?rev=1.1&content-type=text/plain
53
54 Index: portage-2.2.0_alpha109.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.2.0_alpha109.ebuild,v 1.1 2012/06/02 07:41:53 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=3
63 inherit eutils multilib 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="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
69 SLOT="0"
70 IUSE="build doc epydoc +ipc linguas_pl pypy1_8 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="python3? ( =dev-lang/python-3* )
75 !pypy1_8? ( !python2? ( !python3? (
76 || ( >=dev-lang/python-2.7 dev-lang/python:2.6[threads] )
77 ) ) )
78 pypy1_8? ( !python2? ( !python3? ( dev-python/pypy:1.8[bzip2] ) ) )
79 python2? ( !python3? ( || ( dev-lang/python:2.7 dev-lang/python:2.6[threads] ) ) )"
80
81 # The pysqlite blocker is for bug #282760.
82 DEPEND="${python_dep}
83 !build? ( >=sys-apps/sed-4.0.5 )
84 doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
85 epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
86 # Require sandbox-2.2 for bug #288863.
87 # For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
88 # quite slow, so it's not considered in the dependencies as an alternative to
89 # to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
90 # for now, don't pull in xattr deps for other kernels.
91 RDEPEND="${python_dep}
92 !build? ( >=sys-apps/sed-4.0.5
93 >=app-shells/bash-3.2_p17
94 >=app-admin/eselect-1.2 )
95 elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
96 elibc_glibc? ( >=sys-apps/sandbox-2.2 )
97 elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
98 >=app-misc/pax-utils-0.1.17
99 xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
100 selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
101 !<app-shells/bash-3.2_p17
102 !<app-admin/logrotate-3.8.0"
103 PDEPEND="
104 !build? (
105 >=net-misc/rsync-2.6.4
106 userland_GNU? ( >=sys-apps/coreutils-6.4 )
107 )"
108 # coreutils-6.4 rdep is for date format in emerge-webrsync #164532
109 # NOTE: FEATURES=install-sources requires debugedit and rsync
110
111 SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
112
113 prefix_src_archives() {
114 local x y
115 for x in ${@}; do
116 for y in ${SRC_ARCHIVES}; do
117 echo ${y}/${x}
118 done
119 done
120 }
121
122 PV_PL="2.1.2"
123 PATCHVER_PL=""
124 TARBALL_PV=2.2.0_alpha108
125 SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
126 $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
127 linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
128 $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
129
130 PATCHVER=
131 [[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
132 if [ -n "${PATCHVER}" ]; then
133 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
134 $(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
135 fi
136
137 S="${WORKDIR}"/${PN}-${TARBALL_PV}
138 S_PL="${WORKDIR}"/${PN}-${PV_PL}
139
140 compatible_python_is_selected() {
141 [[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
142 }
143
144 current_python_has_xattr() {
145 [[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
146 "${EPREFIX}/usr/bin/python" -c 'import xattr' 2>/dev/null
147 }
148
149 pkg_setup() {
150 # Bug #359731 - Die early if get_libdir fails.
151 [[ -z $(get_libdir) ]] && \
152 die "get_libdir returned an empty string"
153
154 if use python2 && use python3 ; then
155 ewarn "Both python2 and python3 USE flags are enabled, but only one"
156 ewarn "can be in the shebangs. Using python3."
157 fi
158 if use pypy1_8 && use python3 ; then
159 ewarn "Both pypy1_8 and python3 USE flags are enabled, but only one"
160 ewarn "can be in the shebangs. Using python3."
161 fi
162 if use pypy1_8 && use python2 ; then
163 ewarn "Both pypy1_8 and python2 USE flags are enabled, but only one"
164 ewarn "can be in the shebangs. Using python2"
165 fi
166 if ! use pypy1_8 && ! use python2 && ! use python3 && \
167 ! compatible_python_is_selected ; then
168 ewarn "Attempting to select a compatible default python interpreter"
169 local x success=0
170 for x in /usr/bin/python2.* ; do
171 x=${x#/usr/bin/python2.}
172 if [[ $x -ge 6 ]] 2>/dev/null ; then
173 eselect python set python2.$x
174 if compatible_python_is_selected ; then
175 elog "Default python interpreter is now set to python-2.$x"
176 success=1
177 break
178 fi
179 fi
180 done
181 if [ $success != 1 ] ; then
182 eerror "Unable to select a compatible default python interpreter!"
183 die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
184 fi
185 fi
186
187 if use python3; then
188 python_set_active_version 3
189 elif use python2; then
190 python_set_active_version 2
191 elif use pypy1_8; then
192 python_set_active_version 2.7-pypy-1.8
193 fi
194 }
195
196 src_prepare() {
197 if [ -n "${PATCHVER}" ] ; then
198 if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
199 rm "$S/bin/ebuild-helpers/portageq" \
200 || die "failed to remove portageq helper symlink"
201 fi
202 epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
203 fi
204 einfo "Setting portage.VERSION to ${PVR} ..."
205 sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
206 die "Failed to patch portage.VERSION"
207 sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
208 die "Failed to patch VERSION in doc/fragment/version"
209 sed -e "1s/VERSION/${PVR}/" -i man/* || \
210 die "Failed to patch VERSION in man page headers"
211
212 if ! use ipc ; then
213 einfo "Disabling ipc..."
214 sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
215 -i pym/_emerge/AbstractEbuildProcess.py || \
216 die "failed to patch AbstractEbuildProcess.py"
217 fi
218
219 if use xattr && use kernel_linux ; then
220 einfo "Adding FEATURES=xattr to make.globals ..."
221 echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
222 || die "failed to append to make.globals"
223 fi
224
225 if use python3; then
226 einfo "Converting shebangs for python3..."
227 python_convert_shebangs -r 3 .
228 elif use python2; then
229 einfo "Converting shebangs for python2..."
230 python_convert_shebangs -r 2 .
231 elif use pypy1_8; then
232 einfo "Converting shebangs for pypy-c1.8..."
233 python_convert_shebangs -r 2.7-pypy-1.8 .
234 fi
235
236 if [[ -n ${EPREFIX} ]] ; then
237 einfo "Setting portage.const.EPREFIX ..."
238 sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
239 -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
240 -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
241 -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
242 -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
243 -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
244 -i pym/portage/const.py || \
245 die "Failed to patch portage.const.EPREFIX"
246
247 einfo "Prefixing shebangs ..."
248 find . -type f -print0 | \
249 while read -r -d $'\0' ; do
250 local shebang=$(head -n1 "$REPLY")
251 if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
252 sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
253 die "sed failed"
254 fi
255 done
256
257 einfo "Adjusting make.globals ..."
258 sed -e 's|^SYNC=.*|SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"|' \
259 -e "s|^\(PORTDIR=\)\(/usr/portage\)|\\1\"${EPREFIX}\\2\"|" \
260 -e "s|^\(PORTAGE_TMPDIR=\)\(/var/tmp\)|\\1\"${EPREFIX}\\2\"|" \
261 -i cnf/make.globals || die "sed failed"
262
263 einfo "Adding FEATURES=force-prefix to make.globals ..."
264 echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
265 || die "failed to append to make.globals"
266 fi
267
268 cd "${S}/cnf" || die
269 if [ -f "make.conf.${ARCH}".diff ]; then
270 patch make.conf "make.conf.${ARCH}".diff || \
271 die "Failed to patch make.conf.example"
272 else
273 eerror ""
274 eerror "Portage does not have an arch-specific configuration for this arch."
275 eerror "Please notify the arch maintainer about this issue. Using generic."
276 eerror ""
277 fi
278
279 # BSD and OSX need a sed wrapper so that find/xargs work properly
280 if use userland_GNU; then
281 rm -f "${S}"/bin/ebuild-helpers/sed || \
282 die "Failed to remove sed wrapper"
283 fi
284 }
285
286 src_compile() {
287 if use doc; then
288 emake docbook || die
289 fi
290
291 if use epydoc; then
292 einfo "Generating api docs"
293 emake epydoc || die
294 fi
295 }
296
297 src_test() {
298 # make files executable, in case they were created by patch
299 find bin -type f | xargs chmod +x
300 emake test || die
301 }
302
303 src_install() {
304 emake DESTDIR="${D}" \
305 sysconfdir="${EPREFIX}/etc" \
306 prefix="${EPREFIX}/usr" \
307 libdir="${EPREFIX}/usr/$(get_libdir)" \
308 install || die
309
310 # Use dodoc for compression, since the Makefile doesn't do that.
311 dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
312
313 if use linguas_pl; then
314 doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
315 doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
316 fi
317 }
318
319 pkg_preinst() {
320 if [[ $ROOT == / ]] ; then
321 # Run some minimal tests as a sanity check.
322 local test_runner=$(find "$ED" -name runTests)
323 if [[ -n $test_runner && -x $test_runner ]] ; then
324 einfo "Running preinst sanity tests..."
325 "$test_runner" || die "preinst sanity tests failed"
326 fi
327 fi
328
329 if use xattr && ! current_python_has_xattr ; then
330 ewarn "For optimal performance in xattr handling, install"
331 ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
332 ewarn "enable USE=python3 for $CATEGORY/$PN."
333 fi
334
335 if ! use build && ! has_version dev-python/pycrypto && \
336 ! has_version '>=dev-lang/python-2.6[ssl]' ; then
337 ewarn "If you are an ebuild developer and you plan to commit ebuilds"
338 ewarn "with this system then please install dev-python/pycrypto or"
339 ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order"
340 ewarn "to enable RMD160 hash support."
341 ewarn "See bug #198398 for more information."
342 fi
343 if [ -f "${EROOT}/etc/make.globals" ]; then
344 rm "${EROOT}/etc/make.globals"
345 fi
346
347 has_version "<${CATEGORY}/${PN}-2.2_alpha" \
348 && MINOR_UPGRADE=true || MINOR_UPGRADE=false
349
350 has_version "<=${CATEGORY}/${PN}-2.2_pre5" \
351 && WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false
352
353 # If portage-2.1.6 is installed and the preserved_libs_registry exists,
354 # assume that the NEEDED.ELF.2 files have already been generated.
355 has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
356 ! ( [ -e "${EROOT}"var/lib/portage/preserved_libs_registry ] && \
357 has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) \
358 && NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false
359
360 [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" \
361 && REPO_LAYOUT_CONF_WARN=true || REPO_LAYOUT_CONF_WARN=false
362 }
363
364 pkg_postinst() {
365 # Compile all source files recursively. Any orphans
366 # will be identified and removed in postrm.
367 python_mod_optimize /usr/$(get_libdir)/portage/pym
368
369 if $WORLD_MIGRATION_UPGRADE ; then
370 einfo "moving set references from the worldfile into world_sets"
371 cd "${EROOT}/var/lib/portage/"
372 grep "^@" world >> world_sets
373 sed -i -e '/^@/d' world
374 fi
375
376 if $NEEDED_REBUILD_UPGRADE ; then
377 einfo "rebuilding NEEDED.ELF.2 files"
378 for cpv in "${EROOT}/var/db/pkg"/*/*; do
379 if [ -f "${cpv}/NEEDED" ]; then
380 rm -f "${cpv}/NEEDED.ELF.2"
381 while read line; do
382 filename=${line% *}
383 needed=${line#* }
384 needed=${needed//+/++}
385 needed=${needed//#/##}
386 needed=${needed//%/%%}
387 newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
388 newline=${newline// - }
389 echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
390 done < "${cpv}/NEEDED"
391 fi
392 done
393 fi
394
395 if $REPO_LAYOUT_CONF_WARN ; then
396 ewarn
397 echo "If you want overlay eclasses to override eclasses from" \
398 "other repos then see the portage(5) man page" \
399 "for information about the new layout.conf and repos.conf" \
400 "configuration files." \
401 | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done
402 ewarn
403 fi
404
405 if $MINOR_UPGRADE ; then
406 elog "If you're upgrading from a pre-2.2 version of portage you might"
407 elog "want to remerge world (emerge -e world) to take full advantage"
408 elog "of some of the new features in 2.2."
409 elog "This is not required however for portage to function properly."
410 elog
411 fi
412 }
413
414 pkg_postrm() {
415 python_mod_cleanup /usr/$(get_libdir)/portage/pym
416 }