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