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