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