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