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