diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-12-24 06:20:56 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-12-24 06:20:56 +0000 |
commit | 56f8538eab9654119486df6edb734aaf067df10f (patch) | |
tree | bb4d98dd970f379fac1e4429ce1715f109c150c3 /sys-apps | |
parent | Add ** to ACCEPT_KEYWORDS of arm-linux (diff) | |
download | historical-56f8538eab9654119486df6edb734aaf067df10f.tar.gz historical-56f8538eab9654119486df6edb734aaf067df10f.tar.bz2 historical-56f8538eab9654119486df6edb734aaf067df10f.zip |
*portage-2.2_rc61 (24 Dec 2009)
24 Dec 2009; Zac Medico <zmedico@gentoo.org> +portage-2.2_rc61.ebuild:
2.2_rc61 bump. This includes all fixes in 2.1.7.16.
*portage-2.1.7.16 (24 Dec 2009)
24 Dec 2009; Zac Medico <zmedico@gentoo.org> +portage-2.1.7.16.ebuild:
2.1.7.16 bump. This fixes bug #297364 (make ebuild.sh interfere with PATH
less), bug #297541 (repoman upstream.workaround check for no-as-needed),
and bug #297933 (filter BASHOPTS for bash-4.1). Bug #288499 tracks all
bugs fixed since 2.1.6.x.
Package-Manager: portage-2.2_rc61/cvs/Linux i686
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/portage/ChangeLog | 15 | ||||
-rw-r--r-- | sys-apps/portage/Manifest | 12 | ||||
-rw-r--r-- | sys-apps/portage/portage-2.1.7.16.ebuild | 297 | ||||
-rw-r--r-- | sys-apps/portage/portage-2.2_rc61.ebuild | 350 |
4 files changed, 669 insertions, 5 deletions
diff --git a/sys-apps/portage/ChangeLog b/sys-apps/portage/ChangeLog index 10866fe24798..b5a1b1398235 100644 --- a/sys-apps/portage/ChangeLog +++ b/sys-apps/portage/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for sys-apps/portage # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.661 2009/12/17 04:26:13 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.662 2009/12/24 06:20:56 zmedico Exp $ + +*portage-2.2_rc61 (24 Dec 2009) + + 24 Dec 2009; Zac Medico <zmedico@gentoo.org> +portage-2.2_rc61.ebuild: + 2.2_rc61 bump. This includes all fixes in 2.1.7.16. + +*portage-2.1.7.16 (24 Dec 2009) + + 24 Dec 2009; Zac Medico <zmedico@gentoo.org> +portage-2.1.7.16.ebuild: + 2.1.7.16 bump. This fixes bug #297364 (make ebuild.sh interfere with PATH + less), bug #297541 (repoman upstream.workaround check for no-as-needed), + and bug #297933 (filter BASHOPTS for bash-4.1). Bug #288499 tracks all + bugs fixed since 2.1.6.x. *portage-2.2_rc60 (17 Dec 2009) diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest index cc5c04fe8297..9f6ecbdccf81 100644 --- a/sys-apps/portage/Manifest +++ b/sys-apps/portage/Manifest @@ -9,6 +9,7 @@ DIST portage-2.1.7.11.patch.bz2 57841 RMD160 d3bab77511ada01d15ac3114cb1d3a66eee DIST portage-2.1.7.13.patch.bz2 64522 RMD160 3e0389d050ef2097c2f3fb18add6507a24ec00fc SHA1 c9c23b503677f56bae8d2b20679f8002daffa848 SHA256 4989abc86a6635f0698ed4d8bf449e24729ae0cd3ee38a28da4b60a97a949c5a DIST portage-2.1.7.14.patch.bz2 70196 RMD160 c084226d0193566573cbe268508364e7704aa259 SHA1 440f6943f1e85de507ebe2a5cc6cfd0f6e87dc3d SHA256 ba4feddfed4407afaa6f31713e8ccaa7fb9d2e4a3295e73267a59044a4da8fea DIST portage-2.1.7.15.patch.bz2 71593 RMD160 cbdbdd9de43640c3602606745c62811a41e30477 SHA1 bdcd09ab20221dc193a47fcfdddea072279b0f16 SHA256 114dc4dcdbe55e8a3eae2cff2abbfddb65327aeef518128d4cbd643605443add +DIST portage-2.1.7.16.patch.bz2 75375 RMD160 db345d81e51db00833637a6cca3c773c98314635 SHA1 7625fe7d4bedce095e6a0a2325fb98afe5a86aea SHA256 9b37baf17788516623443d8b5c22d5168e078ee8e0d0e194d2b75b3cdc8b9055 DIST portage-2.1.7.tar.bz2 503459 RMD160 245d2b3d778b235e3814ea551a6115e8075d1da5 SHA1 db5b96dfd147954909331f58e24620c41df117e3 SHA256 62f7af85db0090afd424cb398d4b6b434ff1751c77e524dc8a1480e796f28599 DIST portage-2.2_rc15.tar.bz2 685597 RMD160 ad814885c5c6b31899fd4cd7d5866d19132bbd9b SHA1 3b562f0a4157f2cc1cf492f46560e2600ec0681f SHA256 fc381120f77338d33d2e53eb2892eebae0b772233d05cf8a2443700d3d6754f6 DIST portage-2.2_rc33.patch.bz2 200577 RMD160 48d46b6d103009087f0d296d9a428eb3e8059d7b SHA1 9a47ec278362741f2d12c030dc395f4323a974ad SHA256 b8e69329c6cc7b4516f5ed74efa648d1fb8392b644239f5bb4f7cec7a0cdd76e @@ -17,6 +18,7 @@ DIST portage-2.2_rc56.patch.bz2 76244 RMD160 eb7d6a37f63559ea5b57c35ed0bcc8d1302 DIST portage-2.2_rc58.patch.bz2 83076 RMD160 ca0db404a72f35653e7c0fd2778f4402670030bd SHA1 39c372614d550ad48b53ca3e22169c3b9a257445 SHA256 d631cf9f02085e25d80caf6b97a33dbeeabcebc5afdce2abec7e703fbfce5851 DIST portage-2.2_rc59.patch.bz2 88539 RMD160 99c239f2e90db3bcdbcc9aad53a06dc79aa2c006 SHA1 bd1f3419a8fefa8b4ebf072730f067fb736d7334 SHA256 95262830dea01d9ed50890d23d8cb35160129cc88d4154632ad3566e5fe41d29 DIST portage-2.2_rc60.patch.bz2 90032 RMD160 5a67684ef9b15db0d3eb51f7c2f70b118a9d0643 SHA1 0d92f2c761226c38ec2dd9657611e94ba8ce1f87 SHA256 0cb73c3f066f71a09c72077290695e78fbc098899e0d30dce2f472f8e444c108 +DIST portage-2.2_rc61.patch.bz2 93642 RMD160 f0b6a7c87f6ca1053c669bed0e16e6d4d541a5b3 SHA1 51e89c88db6d2ed584d52693cd6a8e78da769de7 SHA256 cb8aa85b3e9c85263281dddeee3102e8f328ff6c61a10211d33f8f5abb8d20f0 DIST portage-man-pl-2.1.2.tar.bz2 53893 RMD160 46c3656b40bf4ad2530ab2b5fbc563708b86748c SHA1 c3151e0b330c589625830e54053fbc676b2c64de SHA256 960eaa7c6f3a2af44bdc665266a8e884628a562373cc477d301597ecc5ef961f EBUILD portage-2.1.6.13.ebuild 10249 RMD160 5b09a3d3eda1bebec6634d8735697bda8289d989 SHA1 131ca76d9630d3a832f003134093a9623028e795 SHA256 e51275ed74c2fd58dd987aba0ddb06b609e733eada680c7ed94440d45cf233af EBUILD portage-2.1.6.7.ebuild 8901 RMD160 5c40ca328a0e24bcc3b04a3c611c09f2f8248c23 SHA1 118de80c813cbd187ba33266b4bac32e43d7e46d SHA256 7478716e9c0d8e2c8deec1f5c6f47ba684b1a7efe3e5f3b9c544f28122fea300 @@ -24,17 +26,19 @@ EBUILD portage-2.1.7.11.ebuild 8490 RMD160 47938d7108a39b6aff3eae656ed0f6bf19bb9 EBUILD portage-2.1.7.13.ebuild 8586 RMD160 eccb8048536da6908be0a5723b5af956fc384040 SHA1 9c1a18ac6e4ecab49eaa6d005c275840635d627a SHA256 923bdcbd94be6d1978095c87f015fe140e1ce779bdd50085daa90063fc85c7a7 EBUILD portage-2.1.7.14.ebuild 9160 RMD160 ab6032f9c27ca4d2bb7d55e416ab412c93ca9ba0 SHA1 31678d79c17c2a0243abbe970365ea8a673c5436 SHA256 8a1f0bfd6d529a3a5e67ba8f5d8ea0a77f0dd05f7f40d3029f6be7a62be57d24 EBUILD portage-2.1.7.15.ebuild 9160 RMD160 ec439030d2b45bb271f5ed70e69f98be6544306d SHA1 cd1d96a9ab6a5a521186bb5280aace084f20bf83 SHA256 127a21ffbad33975deb4d6af63a2e170077b31354b9c2868c1a22ec7ba81fcbe +EBUILD portage-2.1.7.16.ebuild 9160 RMD160 55e4319df98199a5d8e0c5213bf58893a8d679f9 SHA1 8757fd8f9e8e775961216ee3ce8db6b71fc49cc9 SHA256 9e09c9bfcff44e5336a614ea49f6483d59385094702381b5ddcf74124d924686 EBUILD portage-2.2_rc33.ebuild 10657 RMD160 cbec6b53aee00d355c8965cb967d557467705dda SHA1 91b4acc0c25014324eb0cb4c8117a8e3a47b1103 SHA256 7ac2424fea034a979caa48bc5c2596cf0a6511271b4f81b8e9c26f2aee80e4b7 EBUILD portage-2.2_rc56.ebuild 10221 RMD160 4739e90234472e5c2d2c645933625524cf8dd218 SHA1 4d8945e300f007e2bbcfc5a991ef4a1fcf9ce058 SHA256 b13ea8434f42e7a4c79e645703964c2200429d460515aa473e44e8b273ec4b62 EBUILD portage-2.2_rc58.ebuild 10317 RMD160 ff032896877856741ac00c373bff592a28b8f5eb SHA1 f0d4394bfa02c4556e0181aabf041822c3166dfc SHA256 4280ba20eecaac075c57a1c56ab14cbf3fd206b86a55e97cd42348501f0eefcd EBUILD portage-2.2_rc59.ebuild 10891 RMD160 2a286db0c282657d88ab41fb4897a8181ab76db4 SHA1 ab026ab8be17d2480f95178c9c7bd9a93ff9972f SHA256 9ecbfb3a9338988aceed2feeb59110f4ba459e65a34ce6203fa310b2b4999ee8 EBUILD portage-2.2_rc60.ebuild 10891 RMD160 5c89396bb08765046e7db8ce4407565f9b876e9e SHA1 acf468465eeb8733d5d6e3731d4c9307a6e4fa1f SHA256 c3cec210912bddfc8f89d9fc77fb19aaf194cd3563b280dd23c8db9c8d7e6ab1 -MISC ChangeLog 53807 RMD160 e39e1b01d771bf90738c72d0eef57edcbfdcef39 SHA1 f83c7bd8732977c1d1a9e28ac968820f4efa7476 SHA256 a96fa3053e1084e13e5ae74fa9e57942c6a8c8abe5174e59c0bab2dff118daaa +EBUILD portage-2.2_rc61.ebuild 10891 RMD160 b4433a55b6edb85d93780b8c7b2839bfcc2337ce SHA1 945b85d19ee85afe295645ec8b855efb456e828a SHA256 c54625210a18566cbaa5bd25edd0515a7f9035b755aac9d89dc7387a87225f3e +MISC ChangeLog 54327 RMD160 295664be84737e3b6a5a6a34bddd9f50d00b884b SHA1 db657d9946b0a80f713801ed1480cdd625c3e6ae SHA256 6640318f7e6f5fe67acf006ca006a8af0ca7bd6050a69196c40f468754bfa090 MISC metadata.xml 436 RMD160 ac90cc20b6b1e04e386ee758372fa8d9261046ec SHA1 01ec015d6e3a341353400be991c61347fd1f9142 SHA256 cf021b3830c7b854696e5b46b5b802156555e2cd5618ff27826a6a2f8f57a1c0 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) -iEYEARECAAYFAkspswQACgkQ/ejvha5XGaMtTgCgqD1Iu1B+h3Hg1hEKBPrItymx -A4MAnRrQ4DooAgNBAv7DBcsZPI2vBk9o -=vrYp +iEYEARECAAYFAkszCIoACgkQ/ejvha5XGaNw6QCg86h079GRRh0xQSAdDGwM+gZb +LzEAn2dAFXebQwKmOlmna7jFuLxa6SqP +=hzNY -----END PGP SIGNATURE----- diff --git a/sys-apps/portage/portage-2.1.7.16.ebuild b/sys-apps/portage/portage-2.1.7.16.ebuild new file mode 100644 index 000000000000..000741219773 --- /dev/null +++ b/sys-apps/portage/portage-2.1.7.16.ebuild @@ -0,0 +1,297 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.7.16.ebuild,v 1.1 2009/12/24 06:20:56 zmedico Exp $ + +# Require EAPI 2 since we now require at least python-2.6 (for python 3 +# syntax support) which also requires EAPI 2. +EAPI=2 +inherit eutils multilib python + +DESCRIPTION="Portage is the package management and distribution system for Gentoo" +HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +PROVIDE="virtual/portage" +SLOT="0" +IUSE="build doc epydoc linguas_pl python3 selinux" + +python_dep="python3? ( =dev-lang/python-3* ) + !python3? ( || ( ( >=dev-lang/python-2.6 <dev-lang/python-3 ) >=dev-lang/python-3 ) )" + +# The pysqlite blocker is for bug #282760. +DEPEND="${python_dep} + !build? ( >=sys-apps/sed-4.0.5 ) + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) + epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )" +RDEPEND="${python_dep} + !build? ( >=sys-apps/sed-4.0.5 + >=app-shells/bash-3.2_p17 + >=app-admin/eselect-1.2 ) + elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) + elibc_glibc? ( >=sys-apps/sandbox-1.6 ) + elibc_uclibc? ( >=sys-apps/sandbox-1.6 ) + >=app-misc/pax-utils-0.1.17 + selinux? ( sys-libs/libselinux )" +PDEPEND=" + !build? ( + >=net-misc/rsync-2.6.4 + userland_GNU? ( >=sys-apps/coreutils-6.4 ) + )" +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 +# rsync-2.6.4 rdep is for the --filter option #167668 + +SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives" + +prefix_src_archives() { + local x y + for x in ${@}; do + for y in ${SRC_ARCHIVES}; do + echo ${y}/${x} + done + done +} + +PV_PL="2.1.2" +PATCHVER_PL="" +TARBALL_PV=2.1.7 +SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 + $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2) + linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2 + $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )" + +PATCHVER=$PV +if [ -n "${PATCHVER}" ]; then + SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2 + $(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)" +fi + +S="${WORKDIR}"/${PN}-${TARBALL_PV} +S_PL="${WORKDIR}"/${PN}-${PV_PL} + +compatible_python_is_selected() { + [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]] +} + +pkg_setup() { + if ! use python3 && ! compatible_python_is_selected ; then + ewarn "Attempting to select a compatible default python interpreter" + local x success=0 + for x in /usr/bin/python2.* ; do + x=${x#/usr/bin/python2.} + if [[ $x -ge 6 ]] 2>/dev/null ; then + eselect python set python2.$x + if compatible_python_is_selected ; then + elog "Default python interpreter is now set to python-2.$x" + success=1 + break + fi + fi + done + if [ $success != 1 ] ; then + eerror "Unable to select a compatible default python interpreter!" + die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." + fi + fi +} + +src_prepare() { + if [ -n "${PATCHVER}" ] ; then + if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then + rm "$S/bin/ebuild-helpers/portageq" \ + || die "failed to remove portageq helper symlink" + fi + epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" + fi + einfo "Setting portage.VERSION to ${PVR} ..." + sed -i "s/^VERSION=.*/VERSION=\"${PVR}\"/" pym/portage/__init__.py || \ + die "Failed to patch portage.VERSION" + + if use python3; then + python_convert_shebangs -r 3 . + fi +} + +src_compile() { + if use doc; then + cd "${S}"/doc + touch fragment/date + make xhtml xhtml-nochunks || die "failed to make docs" + fi + + if use epydoc; then + einfo "Generating api docs" + mkdir "${WORKDIR}"/api + local my_modules epydoc_opts="" + # A name collision between the portage.dbapi class and the + # module with the same name triggers an epydoc crash unless + # portage.dbapi is excluded from introspection. + ROOT=/ has_version '>=dev-python/epydoc-3_pre0' && \ + epydoc_opts='--exclude-introspect portage\.dbapi' + my_modules="$(find "${S}/pym" -name "*.py" \ + | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ + -e 's:/:.:g' | sort)" || die "error listing modules" + PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ + epydoc -o "${WORKDIR}"/api \ + -qqqqq --no-frames --show-imports $epydoc_opts \ + --name "${PN}" --url "${HOMEPAGE}" \ + ${my_modules} || die "epydoc failed" + fi +} + +src_test() { + PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ + ./pym/portage/tests/runTests || die "test(s) failed" +} + +src_install() { + local libdir=$(get_libdir) + local portage_base="/usr/${libdir}/portage" + local portage_share_config=/usr/share/portage/config + + cd "${S}"/cnf + insinto /etc + doins etc-update.conf dispatch-conf.conf || die + + dodir "${portage_share_config}" + insinto "${portage_share_config}" + doins "${S}/cnf/make.globals" || die + if [ -f "make.conf.${ARCH}".diff ]; then + patch make.conf "make.conf.${ARCH}".diff || \ + die "Failed to patch make.conf.example" + newins make.conf make.conf.example || die + else + eerror "" + eerror "Portage does not have an arch-specific configuration for this arch." + eerror "Please notify the arch maintainer about this issue. Using generic." + eerror "" + newins make.conf make.conf.example || die + fi + + dosym ..${portage_share_config}/make.globals /etc/make.globals + + insinto /etc/logrotate.d + doins "${S}"/cnf/logrotate.d/elog-save-summary || die + + # BSD and OSX need a sed wrapper so that find/xargs work properly + if use userland_GNU; then + rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper" + fi + + local x symlinks + + # current tarball contains outdated stuff + rm -rf "$S"/bin/ebuild-helpers/3 + for x in dohard dosed ; do + dosym ../../banned-helper ${portage_base}/bin/ebuild-helpers/4/$x + done + + for x in $(find "$S"/bin -type d) ; do + x=${x#$S/} + exeinto $portage_base/$x || die "exeinto failed" + cd "$S"/$x || die "cd failed" + doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \ + die "doexe failed" + symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) + if [ -n "$symlinks" ] ; then + cp -P $symlinks "$D$portage_base/$x" || die "cp failed" + fi + done + + for x in $(find "$S"/pym -type d) ; do + x=${x#$S/} + insinto $portage_base/$x || die "insinto failed" + cd "$S"/$x || die "cd failed" + doins *.py || die "doins failed" + symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) + if [ -n "$symlinks" ] ; then + cp -P $symlinks "$D$portage_base/$x" || die "cp failed" + fi + done + + # Symlinks to directories cause up/downgrade issues and the use of these + # modules outside of portage is probably negligible. + for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do + [ ! -L "${x}" ] && continue + die "symlink to directory will cause upgrade/downgrade issues: '${x}'" + done + + exeinto ${portage_base}/pym/portage/tests + doexe "${S}"/pym/portage/tests/runTests + + doman "${S}"/man/*.[0-9] + if use linguas_pl; then + doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] + doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] + fi + + dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} + use doc && dohtml -r "${S}"/doc/* + use epydoc && dohtml -r "${WORKDIR}"/api + + dodir /usr/bin + for x in ebuild egencache emerge portageq repoman ; do + dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} + done + + dodir /usr/sbin + local my_syms="archive-conf + dispatch-conf + emaint + emerge-webrsync + env-update + etc-update + fixpackages + quickpkg + regenworld" + local x + for x in ${my_syms}; do + dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} + done + dosym env-update /usr/sbin/update-env + dosym etc-update /usr/sbin/update-etc + + dodir /etc/portage + keepdir /etc/portage +} + +pkg_preinst() { + if ! use build && ! has_version dev-python/pycrypto && \ + ! has_version '>=dev-lang/python-2.6[ssl]' ; then + ewarn "If you are an ebuild developer and you plan to commit ebuilds" + ewarn "with this system then please install dev-python/pycrypto or" + ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order" + ewarn "to enable RMD160 hash support." + ewarn "See bug #198398 for more information." + fi + if [ -f "${ROOT}/etc/make.globals" ]; then + rm "${ROOT}/etc/make.globals" + fi + + [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" + REPO_LAYOUT_CONF_WARN=$? +} + +pkg_postinst() { + # Compile all source files recursively. Any orphans + # will be identified and removed in postrm. + python_mod_optimize /usr/$(get_libdir)/portage/pym + + if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then + ewarn + echo "If you want overlay eclasses to override eclasses from" \ + "other repos then see the portage(5) man page" \ + "for information about the new layout.conf and repos.conf" \ + "configuration files." \ + | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done + ewarn + fi + + einfo + einfo "For help with using portage please consult the Gentoo Handbook" + einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" + einfo +} + +pkg_postrm() { + python_mod_cleanup /usr/$(get_libdir)/portage/pym +} diff --git a/sys-apps/portage/portage-2.2_rc61.ebuild b/sys-apps/portage/portage-2.2_rc61.ebuild new file mode 100644 index 000000000000..a921725f3fd9 --- /dev/null +++ b/sys-apps/portage/portage-2.2_rc61.ebuild @@ -0,0 +1,350 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2_rc61.ebuild,v 1.1 2009/12/24 06:20:56 zmedico Exp $ + +# Require EAPI 2 since we now require at least python-2.6 (for python 3 +# syntax support) which also requires EAPI 2. +EAPI=2 +inherit eutils multilib python + +DESCRIPTION="Portage is the package management and distribution system for Gentoo" +HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +PROVIDE="virtual/portage" +SLOT="0" +IUSE="build doc epydoc linguas_pl python3 selinux" + +python_dep="python3? ( =dev-lang/python-3* ) + !python3? ( || ( ( >=dev-lang/python-2.6 <dev-lang/python-3 ) >=dev-lang/python-3 ) )" + +# The pysqlite blocker is for bug #282760. +DEPEND="${python_dep} + !build? ( >=sys-apps/sed-4.0.5 ) + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) + epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )" +# Require sandbox-2.2 for bug #288863. +RDEPEND="${python_dep} + !build? ( >=sys-apps/sed-4.0.5 + >=app-shells/bash-3.2_p17 + >=app-admin/eselect-1.2 ) + elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) + elibc_glibc? ( >=sys-apps/sandbox-2.2 ) + elibc_uclibc? ( >=sys-apps/sandbox-2.2 ) + >=app-misc/pax-utils-0.1.17 + selinux? ( sys-libs/libselinux )" +PDEPEND=" + !build? ( + >=net-misc/rsync-2.6.4 + userland_GNU? ( >=sys-apps/coreutils-6.4 ) + )" +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 +# rsync-2.6.4 rdep is for the --filter option #167668 + +SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives" + +prefix_src_archives() { + local x y + for x in ${@}; do + for y in ${SRC_ARCHIVES}; do + echo ${y}/${x} + done + done +} + +PV_PL="2.1.2" +PATCHVER_PL="" +TARBALL_PV=2.2_rc43 +SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 + $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2) + linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2 + $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )" + +PATCHVER=$PV +if [ -n "${PATCHVER}" ]; then + SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2 + $(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)" +fi + +S="${WORKDIR}"/${PN}-${TARBALL_PV} +S_PL="${WORKDIR}"/${PN}-${PV_PL} + +compatible_python_is_selected() { + [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]] +} + +pkg_setup() { + if ! use python3 && ! compatible_python_is_selected ; then + ewarn "Attempting to select a compatible default python interpreter" + local x success=0 + for x in /usr/bin/python2.* ; do + x=${x#/usr/bin/python2.} + if [[ $x -ge 6 ]] 2>/dev/null ; then + eselect python set python2.$x + if compatible_python_is_selected ; then + elog "Default python interpreter is now set to python-2.$x" + success=1 + break + fi + fi + done + if [ $success != 1 ] ; then + eerror "Unable to select a compatible default python interpreter!" + die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." + fi + fi +} + +src_prepare() { + if [ -n "${PATCHVER}" ] ; then + if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then + rm "$S/bin/ebuild-helpers/portageq" \ + || die "failed to remove portageq helper symlink" + fi + epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" + fi + einfo "Setting portage.VERSION to ${PVR} ..." + sed -i "s/^VERSION=.*/VERSION=\"${PVR}\"/" pym/portage/__init__.py || \ + die "Failed to patch portage.VERSION" + + if use python3; then + python_convert_shebangs -r 3 . + fi +} + +src_compile() { + if use doc; then + cd "${S}"/doc + touch fragment/date + make xhtml xhtml-nochunks || die "failed to make docs" + fi + + if use epydoc; then + einfo "Generating api docs" + mkdir "${WORKDIR}"/api + local my_modules epydoc_opts="" + # A name collision between the portage.dbapi class and the + # module with the same name triggers an epydoc crash unless + # portage.dbapi is excluded from introspection. + ROOT=/ has_version '>=dev-python/epydoc-3_pre0' && \ + epydoc_opts='--exclude-introspect portage\.dbapi' + my_modules="$(find "${S}/pym" -name "*.py" \ + | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ + -e 's:/:.:g' | sort)" || die "error listing modules" + PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ + epydoc -o "${WORKDIR}"/api \ + -qqqqq --no-frames --show-imports $epydoc_opts \ + --name "${PN}" --url "${HOMEPAGE}" \ + ${my_modules} || die "epydoc failed" + fi +} + +src_test() { + PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ + ./pym/portage/tests/runTests || die "test(s) failed" +} + +src_install() { + local libdir=$(get_libdir) + local portage_base="/usr/${libdir}/portage" + local portage_share_config=/usr/share/portage/config + + cd "${S}"/cnf + insinto /etc + doins etc-update.conf dispatch-conf.conf || die + + insinto "${portage_share_config}" + doins "${S}/cnf/"{sets.conf,make.globals} || die + if [ -f "make.conf.${ARCH}".diff ]; then + patch make.conf "make.conf.${ARCH}".diff || \ + die "Failed to patch make.conf.example" + newins make.conf make.conf.example || die + else + eerror "" + eerror "Portage does not have an arch-specific configuration for this arch." + eerror "Please notify the arch maintainer about this issue. Using generic." + eerror "" + newins make.conf make.conf.example || die + fi + + dosym ..${portage_share_config}/make.globals /etc/make.globals + + insinto /etc/logrotate.d + doins "${S}"/cnf/logrotate.d/elog-save-summary || die + + # BSD and OSX need a sed wrapper so that find/xargs work properly + if use userland_GNU; then + rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper" + fi + + local x symlinks + + # current tarball contains outdated stuff + rm -rf "$S"/bin/ebuild-helpers/3 + for x in dohard dosed ; do + dosym ../../banned-helper ${portage_base}/bin/ebuild-helpers/4/$x + done + + for x in $(find "$S"/bin -type d) ; do + x=${x#$S/} + exeinto $portage_base/$x || die "exeinto failed" + cd "$S"/$x || die "cd failed" + doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \ + die "doexe failed" + symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) + if [ -n "$symlinks" ] ; then + cp -P $symlinks "$D$portage_base/$x" || die "cp failed" + fi + done + + for x in $(find "$S"/pym -type d) ; do + x=${x#$S/} + insinto $portage_base/$x || die "insinto failed" + cd "$S"/$x || die "cd failed" + doins *.py || die "doins failed" + symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) + if [ -n "$symlinks" ] ; then + cp -P $symlinks "$D$portage_base/$x" || die "cp failed" + fi + done + + # Symlinks to directories cause up/downgrade issues and the use of these + # modules outside of portage is probably negligible. + for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do + [ ! -L "${x}" ] && continue + die "symlink to directory will cause upgrade/downgrade issues: '${x}'" + done + + exeinto ${portage_base}/pym/portage/tests + doexe "${S}"/pym/portage/tests/runTests + + doman "${S}"/man/*.[0-9] + if use linguas_pl; then + doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] + doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] + fi + + dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} + use doc && dohtml -r "${S}"/doc/* + use epydoc && dohtml -r "${WORKDIR}"/api + + dodir /usr/bin + for x in ebuild egencache emerge portageq repoman ; do + dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} + done + + dodir /usr/sbin + local my_syms="archive-conf + dispatch-conf + emaint + emerge-webrsync + env-update + etc-update + fixpackages + quickpkg + regenworld" + local x + for x in ${my_syms}; do + dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} + done + dosym env-update /usr/sbin/update-env + dosym etc-update /usr/sbin/update-etc + + dodir /etc/portage + keepdir /etc/portage +} + +pkg_preinst() { + if ! use build && ! has_version dev-python/pycrypto && \ + ! has_version '>=dev-lang/python-2.6[ssl]' ; then + ewarn "If you are an ebuild developer and you plan to commit ebuilds" + ewarn "with this system then please install dev-python/pycrypto or" + ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order" + ewarn "to enable RMD160 hash support." + ewarn "See bug #198398 for more information." + fi + if [ -f "${ROOT}/etc/make.globals" ]; then + rm "${ROOT}/etc/make.globals" + fi + + has_version "<${CATEGORY}/${PN}-2.2_alpha" + MINOR_UPGRADE=$? + + has_version "<=${CATEGORY}/${PN}-2.2_pre5" + WORLD_MIGRATION_UPGRADE=$? + + # If portage-2.1.6 is installed and the preserved_libs_registry exists, + # assume that the NEEDED.ELF.2 files have already been generated. + has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \ + ! ( [ -e "$ROOT"var/lib/portage/preserved_libs_registry ] && \ + has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) + NEEDED_REBUILD_UPGRADE=$? + + [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" + REPO_LAYOUT_CONF_WARN=$? +} + +pkg_postinst() { + # Compile all source files recursively. Any orphans + # will be identified and removed in postrm. + python_mod_optimize /usr/$(get_libdir)/portage/pym + + if [ $WORLD_MIGRATION_UPGRADE = 0 ] ; then + einfo "moving set references from the worldfile into world_sets" + cd "${ROOT}/var/lib/portage/" + grep "^@" world >> world_sets + sed -i -e '/^@/d' world + fi + + if [ $NEEDED_REBUILD_UPGRADE = 0 ] ; then + einfo "rebuilding NEEDED.ELF.2 files" + for cpv in "${ROOT}/var/db/pkg"/*/*; do + if [ -f "${cpv}/NEEDED" ]; then + rm -f "${cpv}/NEEDED.ELF.2" + while read line; do + filename=${line% *} + needed=${line#* } + needed=${needed//+/++} + needed=${needed//#/##} + needed=${needed//%/%%} + newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename) + newline=${newline// - } + echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2" + done < "${cpv}/NEEDED" + fi + done + fi + + if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then + ewarn + echo "If you want overlay eclasses to override eclasses from" \ + "other repos then see the portage(5) man page" \ + "for information about the new layout.conf and repos.conf" \ + "configuration files." \ + | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done + ewarn + fi + + einfo + einfo "For help with using portage please consult the Gentoo Handbook" + einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" + einfo + + if [ $MINOR_UPGRADE = 0 ] ; then + elog "If you're upgrading from a pre-2.2 version of portage you might" + elog "want to remerge world (emerge -e world) to take full advantage" + elog "of some of the new features in 2.2." + elog "This is not required however for portage to function properly." + elog + fi + + if [ -z "${PV/*_rc*}" ]; then + elog "If you always want to use the latest development version of portage" + elog "please read http://www.gentoo.org/proj/en/portage/doc/testing.xml" + elog + fi +} + +pkg_postrm() { + python_mod_cleanup /usr/$(get_libdir)/portage/pym +} |