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