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: ChangeLog portage-2.2_rc54.ebuild portage-2.1.7.9.ebuild
Date: Sat, 28 Nov 2009 23:28:44
Message-Id: E1NEWiU-0002r1-4C@stork.gentoo.org
1 zmedico 09/11/28 23:28:38
2
3 Modified: ChangeLog
4 Added: portage-2.2_rc54.ebuild portage-2.1.7.9.ebuild
5 Log:
6 *portage-2.2_rc54 (28 Nov 2009)
7
8 28 Nov 2009; Zac Medico <zmedico@g.o> +portage-2.2_rc54.ebuild:
9 2.2_rc54 bump. This includes all fixes in 2.1.7.9.
10
11 *portage-2.1.7.9 (28 Nov 2009)
12
13 28 Nov 2009; Zac Medico <zmedico@g.o> +portage-2.1.7.9.ebuild:
14 2.1.7.9 bump. This fixes bug #294945 (KeyError triggered by blockers).
15 Bug #288499 tracks all bugs fixed since 2.1.6.x.
16 (Portage version: 2.2_rc54/cvs/Linux i686)
17
18 Revision Changes Path
19 1.653 sys-apps/portage/ChangeLog
20
21 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.653&view=markup
22 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.653&content-type=text/plain
23 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.652&r2=1.653
24
25 Index: ChangeLog
26 ===================================================================
27 RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v
28 retrieving revision 1.652
29 retrieving revision 1.653
30 diff -u -r1.652 -r1.653
31 --- ChangeLog 28 Nov 2009 00:23:38 -0000 1.652
32 +++ ChangeLog 28 Nov 2009 23:28:37 -0000 1.653
33 @@ -1,6 +1,17 @@
34 # ChangeLog for sys-apps/portage
35 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
36 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.652 2009/11/28 00:23:38 zmedico Exp $
37 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.653 2009/11/28 23:28:37 zmedico Exp $
38 +
39 +*portage-2.2_rc54 (28 Nov 2009)
40 +
41 + 28 Nov 2009; Zac Medico <zmedico@g.o> +portage-2.2_rc54.ebuild:
42 + 2.2_rc54 bump. This includes all fixes in 2.1.7.9.
43 +
44 +*portage-2.1.7.9 (28 Nov 2009)
45 +
46 + 28 Nov 2009; Zac Medico <zmedico@g.o> +portage-2.1.7.9.ebuild:
47 + 2.1.7.9 bump. This fixes bug #294945 (KeyError triggered by blockers).
48 + Bug #288499 tracks all bugs fixed since 2.1.6.x.
49
50 *portage-2.2_rc53 (27 Nov 2009)
51
52
53
54
55 1.1 sys-apps/portage/portage-2.2_rc54.ebuild
56
57 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/portage-2.2_rc54.ebuild?rev=1.1&view=markup
58 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/portage-2.2_rc54.ebuild?rev=1.1&content-type=text/plain
59
60 Index: portage-2.2_rc54.ebuild
61 ===================================================================
62 # Copyright 1999-2009 Gentoo Foundation
63 # Distributed under the terms of the GNU General Public License v2
64 # $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2_rc54.ebuild,v 1.1 2009/11/28 23:28:37 zmedico Exp $
65
66 # Require EAPI 2 since we now require at least python-2.6 (for python 3
67 # syntax support) which also requires EAPI 2.
68 EAPI=2
69 inherit eutils multilib python
70
71 DESCRIPTION="Portage is the package management and distribution system for Gentoo"
72 HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
73 LICENSE="GPL-2"
74 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
75 PROVIDE="virtual/portage"
76 SLOT="0"
77 IUSE="build doc epydoc linguas_pl python3 selinux"
78
79 python_dep="python3? ( =dev-lang/python-3* )
80 !python3? ( || ( ( >=dev-lang/python-2.6 <dev-lang/python-3 ) >=dev-lang/python-3 ) )"
81
82 # The pysqlite blocker is for bug #282760.
83 DEPEND="${python_dep}
84 !build? ( >=sys-apps/sed-4.0.5 )
85 doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
86 epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
87 # Require sandbox-2.2 for bug #288863.
88 RDEPEND="${python_dep}
89 !build? ( >=sys-apps/sed-4.0.5
90 >=app-shells/bash-3.2_p17
91 >=app-admin/eselect-1.2 )
92 elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
93 elibc_glibc? ( >=sys-apps/sandbox-2.2 )
94 elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
95 >=app-misc/pax-utils-0.1.17
96 selinux? ( sys-libs/libselinux )"
97 PDEPEND="
98 !build? (
99 >=net-misc/rsync-2.6.4
100 userland_GNU? ( >=sys-apps/coreutils-6.4 )
101 )"
102 # coreutils-6.4 rdep is for date format in emerge-webrsync #164532
103 # rsync-2.6.4 rdep is for the --filter option #167668
104
105 SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
106
107 prefix_src_archives() {
108 local x y
109 for x in ${@}; do
110 for y in ${SRC_ARCHIVES}; do
111 echo ${y}/${x}
112 done
113 done
114 }
115
116 PV_PL="2.1.2"
117 PATCHVER_PL=""
118 TARBALL_PV=2.2_rc43
119 SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
120 $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
121 linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
122 $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
123
124 PATCHVER=$PV
125 if [ -n "${PATCHVER}" ]; then
126 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
127 $(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
128 fi
129
130 S="${WORKDIR}"/${PN}-${TARBALL_PV}
131 S_PL="${WORKDIR}"/${PN}-${PV_PL}
132
133 pkg_setup() {
134 if [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') != good ]] ; then
135 die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
136 fi
137 }
138
139 src_prepare() {
140 if [ -n "${PATCHVER}" ] ; then
141 if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
142 rm "$S/bin/ebuild-helpers/portageq" \
143 || die "failed to remove portageq helper symlink"
144 fi
145 epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
146 fi
147 einfo "Setting portage.VERSION to ${PVR} ..."
148 sed -i "s/^VERSION=.*/VERSION=\"${PVR}\"/" pym/portage/__init__.py || \
149 die "Failed to patch portage.VERSION"
150
151 if use python3; then
152 sed -e '1s/\(^#!.*\)python\(.*$\)/\1python3\2/' -i $(find -perm /111 -type f) || die "Conversion of shebangs failed"
153 fi
154 }
155
156 src_compile() {
157 if use doc; then
158 cd "${S}"/doc
159 touch fragment/date
160 make xhtml xhtml-nochunks || die "failed to make docs"
161 fi
162
163 if use epydoc; then
164 einfo "Generating api docs"
165 mkdir "${WORKDIR}"/api
166 local my_modules epydoc_opts=""
167 # A name collision between the portage.dbapi class and the
168 # module with the same name triggers an epydoc crash unless
169 # portage.dbapi is excluded from introspection.
170 ROOT=/ has_version '>=dev-python/epydoc-3_pre0' && \
171 epydoc_opts='--exclude-introspect portage\.dbapi'
172 my_modules="$(find "${S}/pym" -name "*.py" \
173 | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \
174 -e 's:/:.:g' | sort)" || die "error listing modules"
175 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
176 epydoc -o "${WORKDIR}"/api \
177 -qqqqq --no-frames --show-imports $epydoc_opts \
178 --name "${PN}" --url "${HOMEPAGE}" \
179 ${my_modules} || die "epydoc failed"
180 fi
181 }
182
183 src_test() {
184 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
185 ./pym/portage/tests/runTests || die "test(s) failed"
186 }
187
188 src_install() {
189 local libdir=$(get_libdir)
190 local portage_base="/usr/${libdir}/portage"
191 local portage_share_config=/usr/share/portage/config
192
193 cd "${S}"/cnf
194 insinto /etc
195 doins etc-update.conf dispatch-conf.conf || die
196
197 insinto "${portage_share_config}"
198 doins "${S}/cnf/"{sets.conf,make.globals} || die
199 if [ -f "make.conf.${ARCH}".diff ]; then
200 patch make.conf "make.conf.${ARCH}".diff || \
201 die "Failed to patch make.conf.example"
202 newins make.conf make.conf.example || die
203 else
204 eerror ""
205 eerror "Portage does not have an arch-specific configuration for this arch."
206 eerror "Please notify the arch maintainer about this issue. Using generic."
207 eerror ""
208 newins make.conf make.conf.example || die
209 fi
210
211 dosym ..${portage_share_config}/make.globals /etc/make.globals
212
213 insinto /etc/logrotate.d
214 doins "${S}"/cnf/logrotate.d/elog-save-summary || die
215
216 # BSD and OSX need a sed wrapper so that find/xargs work properly
217 if use userland_GNU; then
218 rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper"
219 fi
220
221 local x symlinks
222 for x in $(find "$S"/bin -type d) ; do
223 x=${x#$S/}
224 exeinto $portage_base/$x || die "exeinto failed"
225 cd "$S"/$x || die "cd failed"
226 doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \
227 die "doexe failed"
228 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
229 if [ -n "$symlinks" ] ; then
230 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
231 fi
232 done
233
234 for x in $(find "$S"/pym -type d) ; do
235 x=${x#$S/}
236 insinto $portage_base/$x || die "insinto failed"
237 cd "$S"/$x || die "cd failed"
238 doins *.py || die "doins failed"
239 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
240 if [ -n "$symlinks" ] ; then
241 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
242 fi
243 done
244
245 # Symlinks to directories cause up/downgrade issues and the use of these
246 # modules outside of portage is probably negligible.
247 for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do
248 [ ! -L "${x}" ] && continue
249 die "symlink to directory will cause upgrade/downgrade issues: '${x}'"
250 done
251
252 exeinto ${portage_base}/pym/portage/tests
253 doexe "${S}"/pym/portage/tests/runTests
254
255 doman "${S}"/man/*.[0-9]
256 if use linguas_pl; then
257 doman -i18n=pl "${S_PL}"/man/pl/*.[0-9]
258 doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9]
259 fi
260
261 dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES}
262 use doc && dohtml -r "${S}"/doc/*
263 use epydoc && dohtml -r "${WORKDIR}"/api
264
265 dodir /usr/bin
266 for x in ebuild egencache emerge portageq repoman ; do
267 dosym ../${libdir}/portage/bin/${x} /usr/bin/${x}
268 done
269
270 dodir /usr/sbin
271 local my_syms="archive-conf
272 dispatch-conf
273 emaint
274 emerge-webrsync
275 env-update
276 etc-update
277 fixpackages
278 quickpkg
279 regenworld"
280 local x
281 for x in ${my_syms}; do
282 dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x}
283 done
284 dosym env-update /usr/sbin/update-env
285 dosym etc-update /usr/sbin/update-etc
286
287 dodir /etc/portage
288 keepdir /etc/portage
289 }
290
291 pkg_preinst() {
292 if ! use build && ! has_version dev-python/pycrypto && \
293 ! has_version '>=dev-lang/python-2.6[ssl]' ; then
294 ewarn "If you are an ebuild developer and you plan to commit ebuilds"
295 ewarn "with this system then please install dev-python/pycrypto or"
296 ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order"
297 ewarn "to enable RMD160 hash support."
298 ewarn "See bug #198398 for more information."
299 fi
300 if [ -f "${ROOT}/etc/make.globals" ]; then
301 rm "${ROOT}/etc/make.globals"
302 fi
303
304 has_version "<${CATEGORY}/${PN}-2.2_alpha"
305 MINOR_UPGRADE=$?
306
307 has_version "<=${CATEGORY}/${PN}-2.2_pre5"
308 WORLD_MIGRATION_UPGRADE=$?
309
310 # If portage-2.1.6 is installed and the preserved_libs_registry exists,
311 # assume that the NEEDED.ELF.2 files have already been generated.
312 has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
313 ! ( [ -e "$ROOT"var/lib/portage/preserved_libs_registry ] && \
314 has_version ">=${CATEGORY}/${PN}-2.1.6_rc" )
315 NEEDED_REBUILD_UPGRADE=$?
316
317 [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12"
318 REPO_LAYOUT_CONF_WARN=$?
319 }
320
321 pkg_postinst() {
322 # Compile all source files recursively. Any orphans
323 # will be identified and removed in postrm.
324 python_mod_optimize /usr/$(get_libdir)/portage/pym
325
326 if [ $WORLD_MIGRATION_UPGRADE = 0 ] ; then
327 einfo "moving set references from the worldfile into world_sets"
328 cd "${ROOT}/var/lib/portage/"
329 grep "^@" world >> world_sets
330 sed -i -e '/^@/d' world
331 fi
332
333 if [ $NEEDED_REBUILD_UPGRADE = 0 ] ; then
334 einfo "rebuilding NEEDED.ELF.2 files"
335 for cpv in "${ROOT}/var/db/pkg"/*/*; do
336 if [ -f "${cpv}/NEEDED" ]; then
337 rm -f "${cpv}/NEEDED.ELF.2"
338 while read line; do
339 filename=${line% *}
340 needed=${line#* }
341 needed=${needed//+/++}
342 needed=${needed//#/##}
343 needed=${needed//%/%%}
344 newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
345 newline=${newline// - }
346 echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
347 done < "${cpv}/NEEDED"
348 fi
349 done
350 fi
351
352 if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then
353 ewarn
354 echo "If you want overlay eclasses to override eclasses from" \
355 "other repos then see the portage(5) man page" \
356 "for information about the new layout.conf and repos.conf" \
357 "configuration files." \
358 | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done
359 ewarn
360 fi
361
362 einfo
363 einfo "For help with using portage please consult the Gentoo Handbook"
364 einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3"
365 einfo
366
367 if [ $MINOR_UPGRADE = 0 ] ; then
368 elog "If you're upgrading from a pre-2.2 version of portage you might"
369 elog "want to remerge world (emerge -e world) to take full advantage"
370 elog "of some of the new features in 2.2."
371 elog "This is not required however for portage to function properly."
372 elog
373 fi
374
375 if [ -z "${PV/*_rc*}" ]; then
376 elog "If you always want to use the latest development version of portage"
377 elog "please read http://www.gentoo.org/proj/en/portage/doc/testing.xml"
378 elog
379 fi
380 }
381
382 pkg_postrm() {
383 python_mod_cleanup /usr/$(get_libdir)/portage/pym
384 }
385
386
387
388 1.1 sys-apps/portage/portage-2.1.7.9.ebuild
389
390 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/portage-2.1.7.9.ebuild?rev=1.1&view=markup
391 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/portage-2.1.7.9.ebuild?rev=1.1&content-type=text/plain
392
393 Index: portage-2.1.7.9.ebuild
394 ===================================================================
395 # Copyright 1999-2009 Gentoo Foundation
396 # Distributed under the terms of the GNU General Public License v2
397 # $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.7.9.ebuild,v 1.1 2009/11/28 23:28:37 zmedico Exp $
398
399 # Require EAPI 2 since we now require at least python-2.6 (for python 3
400 # syntax support) which also requires EAPI 2.
401 EAPI=2
402 inherit eutils multilib python
403
404 DESCRIPTION="Portage is the package management and distribution system for Gentoo"
405 HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
406 LICENSE="GPL-2"
407 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
408 PROVIDE="virtual/portage"
409 SLOT="0"
410 IUSE="build doc epydoc linguas_pl python3 selinux"
411
412 python_dep="python3? ( =dev-lang/python-3* )
413 !python3? ( || ( ( >=dev-lang/python-2.6 <dev-lang/python-3 ) >=dev-lang/python-3 ) )"
414
415 # The pysqlite blocker is for bug #282760.
416 DEPEND="${python_dep}
417 !build? ( >=sys-apps/sed-4.0.5 )
418 doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
419 epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
420 RDEPEND="${python_dep}
421 !build? ( >=sys-apps/sed-4.0.5
422 >=app-shells/bash-3.2_p17
423 >=app-admin/eselect-1.2 )
424 elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
425 elibc_glibc? ( >=sys-apps/sandbox-1.6 )
426 elibc_uclibc? ( >=sys-apps/sandbox-1.6 )
427 >=app-misc/pax-utils-0.1.17
428 selinux? ( sys-libs/libselinux )"
429 PDEPEND="
430 !build? (
431 >=net-misc/rsync-2.6.4
432 userland_GNU? ( >=sys-apps/coreutils-6.4 )
433 )"
434 # coreutils-6.4 rdep is for date format in emerge-webrsync #164532
435 # rsync-2.6.4 rdep is for the --filter option #167668
436
437 SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
438
439 prefix_src_archives() {
440 local x y
441 for x in ${@}; do
442 for y in ${SRC_ARCHIVES}; do
443 echo ${y}/${x}
444 done
445 done
446 }
447
448 PV_PL="2.1.2"
449 PATCHVER_PL=""
450 TARBALL_PV=2.1.7
451 SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
452 $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
453 linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
454 $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
455
456 PATCHVER=$PV
457 if [ -n "${PATCHVER}" ]; then
458 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
459 $(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
460 fi
461
462 S="${WORKDIR}"/${PN}-${TARBALL_PV}
463 S_PL="${WORKDIR}"/${PN}-${PV_PL}
464
465 pkg_setup() {
466 if [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') != good ]] ; then
467 die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
468 fi
469 }
470
471 src_prepare() {
472 if [ -n "${PATCHVER}" ] ; then
473 if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
474 rm "$S/bin/ebuild-helpers/portageq" \
475 || die "failed to remove portageq helper symlink"
476 fi
477 epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
478 fi
479 einfo "Setting portage.VERSION to ${PVR} ..."
480 sed -i "s/^VERSION=.*/VERSION=\"${PVR}\"/" pym/portage/__init__.py || \
481 die "Failed to patch portage.VERSION"
482
483 if use python3; then
484 sed -e '1s/\(^#!.*\)python\(.*$\)/\1python3\2/' -i $(find -perm /111 -type f) || die "Conversion of shebangs failed"
485 fi
486 }
487
488 src_compile() {
489 if use doc; then
490 cd "${S}"/doc
491 touch fragment/date
492 make xhtml xhtml-nochunks || die "failed to make docs"
493 fi
494
495 if use epydoc; then
496 einfo "Generating api docs"
497 mkdir "${WORKDIR}"/api
498 local my_modules epydoc_opts=""
499 # A name collision between the portage.dbapi class and the
500 # module with the same name triggers an epydoc crash unless
501 # portage.dbapi is excluded from introspection.
502 ROOT=/ has_version '>=dev-python/epydoc-3_pre0' && \
503 epydoc_opts='--exclude-introspect portage\.dbapi'
504 my_modules="$(find "${S}/pym" -name "*.py" \
505 | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \
506 -e 's:/:.:g' | sort)" || die "error listing modules"
507 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
508 epydoc -o "${WORKDIR}"/api \
509 -qqqqq --no-frames --show-imports $epydoc_opts \
510 --name "${PN}" --url "${HOMEPAGE}" \
511 ${my_modules} || die "epydoc failed"
512 fi
513 }
514
515 src_test() {
516 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
517 ./pym/portage/tests/runTests || die "test(s) failed"
518 }
519
520 src_install() {
521 local libdir=$(get_libdir)
522 local portage_base="/usr/${libdir}/portage"
523 local portage_share_config=/usr/share/portage/config
524
525 cd "${S}"/cnf
526 insinto /etc
527 doins etc-update.conf dispatch-conf.conf || die
528
529 dodir "${portage_share_config}"
530 insinto "${portage_share_config}"
531 doins "${S}/cnf/make.globals" || die
532 if [ -f "make.conf.${ARCH}".diff ]; then
533 patch make.conf "make.conf.${ARCH}".diff || \
534 die "Failed to patch make.conf.example"
535 newins make.conf make.conf.example || die
536 else
537 eerror ""
538 eerror "Portage does not have an arch-specific configuration for this arch."
539 eerror "Please notify the arch maintainer about this issue. Using generic."
540 eerror ""
541 newins make.conf make.conf.example || die
542 fi
543
544 dosym ..${portage_share_config}/make.globals /etc/make.globals
545
546 insinto /etc/logrotate.d
547 doins "${S}"/cnf/logrotate.d/elog-save-summary || die
548
549 # BSD and OSX need a sed wrapper so that find/xargs work properly
550 if use userland_GNU; then
551 rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper"
552 fi
553
554 local x symlinks
555 for x in $(find "$S"/bin -type d) ; do
556 x=${x#$S/}
557 exeinto $portage_base/$x || die "exeinto failed"
558 cd "$S"/$x || die "cd failed"
559 doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \
560 die "doexe failed"
561 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
562 if [ -n "$symlinks" ] ; then
563 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
564 fi
565 done
566
567 for x in $(find "$S"/pym -type d) ; do
568 x=${x#$S/}
569 insinto $portage_base/$x || die "insinto failed"
570 cd "$S"/$x || die "cd failed"
571 doins *.py || die "doins failed"
572 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
573 if [ -n "$symlinks" ] ; then
574 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
575 fi
576 done
577
578 # Symlinks to directories cause up/downgrade issues and the use of these
579 # modules outside of portage is probably negligible.
580 for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do
581 [ ! -L "${x}" ] && continue
582 die "symlink to directory will cause upgrade/downgrade issues: '${x}'"
583 done
584
585 exeinto ${portage_base}/pym/portage/tests
586 doexe "${S}"/pym/portage/tests/runTests
587
588 doman "${S}"/man/*.[0-9]
589 if use linguas_pl; then
590 doman -i18n=pl "${S_PL}"/man/pl/*.[0-9]
591 doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9]
592 fi
593
594 dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES}
595 use doc && dohtml -r "${S}"/doc/*
596 use epydoc && dohtml -r "${WORKDIR}"/api
597
598 dodir /usr/bin
599 for x in ebuild egencache emerge portageq repoman ; do
600 dosym ../${libdir}/portage/bin/${x} /usr/bin/${x}
601 done
602
603 dodir /usr/sbin
604 local my_syms="archive-conf
605 dispatch-conf
606 emaint
607 emerge-webrsync
608 env-update
609 etc-update
610 fixpackages
611 quickpkg
612 regenworld"
613 local x
614 for x in ${my_syms}; do
615 dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x}
616 done
617 dosym env-update /usr/sbin/update-env
618 dosym etc-update /usr/sbin/update-etc
619
620 dodir /etc/portage
621 keepdir /etc/portage
622 }
623
624 pkg_preinst() {
625 if ! use build && ! has_version dev-python/pycrypto && \
626 ! has_version '>=dev-lang/python-2.6[ssl]' ; then
627 ewarn "If you are an ebuild developer and you plan to commit ebuilds"
628 ewarn "with this system then please install dev-python/pycrypto or"
629 ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order"
630 ewarn "to enable RMD160 hash support."
631 ewarn "See bug #198398 for more information."
632 fi
633 if [ -f "${ROOT}/etc/make.globals" ]; then
634 rm "${ROOT}/etc/make.globals"
635 fi
636
637 [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12"
638 REPO_LAYOUT_CONF_WARN=$?
639 }
640
641 pkg_postinst() {
642 # Compile all source files recursively. Any orphans
643 # will be identified and removed in postrm.
644 python_mod_optimize /usr/$(get_libdir)/portage/pym
645
646 if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then
647 ewarn
648 echo "If you want overlay eclasses to override eclasses from" \
649 "other repos then see the portage(5) man page" \
650 "for information about the new layout.conf and repos.conf" \
651 "configuration files." \
652 | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done
653 ewarn
654 fi
655
656 einfo
657 einfo "For help with using portage please consult the Gentoo Handbook"
658 einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3"
659 einfo
660 }
661
662 pkg_postrm() {
663 python_mod_cleanup /usr/$(get_libdir)/portage/pym
664 }