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