sys-apps/portage: Add live ebuild (permission by zmedico)
authorSebastian Pipping <sping@gentoo.org>
Thu, 25 Mar 2010 02:17:04 +0000 (02:17 +0000)
committerSebastian Pipping <sping@gentoo.org>
Thu, 25 Mar 2010 02:17:04 +0000 (02:17 +0000)
Package-Manager: portage-2.2_rc67-26-g1f09ba1/cvs/Linux i686

sys-apps/portage/ChangeLog
sys-apps/portage/Manifest
sys-apps/portage/portage-9999.ebuild [new file with mode: 0644]

index b2acdfeea56105dce802319c2bee2fa11a841e75..bf15e04ff10d3c7d979806e8f4db1d5ee462fc44 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for sys-apps/portage
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.693 2010/03/20 23:40:14 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.694 2010/03/25 02:17:04 sping Exp $
+
+*portage-9999 (25 Mar 2010)
+
+  25 Mar 2010; Sebastian Pipping <sping@gentoo.org> +portage-9999.ebuild:
+  Add live ebuild (permission by zmedico)
 
   20 Mar 2010; Zac Medico <zmedico@gentoo.org> -portage-2.1.8.1.ebuild,
   -portage-2.2_rc65.ebuild:
index 1b5ea2670c242fa272d8b549e6a1eb9eff73d063..b5f43377a6abcf3a62652fb5867c49bf5eac273a 100644 (file)
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
 AUX README.RESCUE 137 RMD160 b8d015f266501fd1f57c91899c6815de9f9d5685 SHA1 cfc8fcf81921e265f40b47644916331e0b8f18b9 SHA256 69bea0c755eab59b6b4d90838b8551744f0b0c8eeac170b1cd13a71ee83f9ac4
 DIST portage-2.1.6.13.patch.bz2 177383 RMD160 ef6388ca4a55a7defb319d54c9d80625cb8e12dc SHA1 5298feb6f881c25abdbde4a353d341fd36fdee51 SHA256 2cc897b6fa43b3329ef51f6304c064237be6bc326f1f0c221a19c0f96b69cd9c
 DIST portage-2.1.6.7.patch.bz2 50118 RMD160 cc0a322570829c8dec9aa4886deb5741f0efb489 SHA1 02021be38b0f829d45b342483834652a1985a952 SHA256 5f0605b51a24d23703330b040d2f7154322284db3e0cefa7499002ff1fa733c0
@@ -20,12 +17,6 @@ EBUILD portage-2.1.7.17.ebuild 10121 RMD160 450a29c406bd178de4396835f0582e043114
 EBUILD portage-2.1.8.3.ebuild 9210 RMD160 e6698ebd63f5b593a475386992ac982d7c97d3dd SHA1 3ad899721ef1c039e9bee74d44ab418bd2cc5928 SHA256 0cb2e1df83587ff32de573d532271b8757b250826fd5221db683b6474d0a0869
 EBUILD portage-2.2_rc62.ebuild 11046 RMD160 9f093b14959b0c8f45ba8f0e0478d296a7ffc5a5 SHA1 b68099591f14cf208f3dd14934e7e5514048b898 SHA256 15d2d9980755987ef68ce5d51b2351cdf4a451e58e6720084cd1e10b84ba8265
 EBUILD portage-2.2_rc67.ebuild 10585 RMD160 5b048e89f617091897af67f01376063b3370184b SHA1 e007b51065300dcad3cd389114899ae422a0c01e SHA256 c089377b80103250aeeff43310b264a0310198de79b3fd032f57cbc535332bc2
-MISC ChangeLog 10798 RMD160 a336ededde88c4131d3a9d1d81f4dfdc1cc0deac SHA1 0fa8c2f1d16479064ebd8a56b66f5f4ee715621f SHA256 fa8e88b6fa906ec56d2e98994a723d5e8c10875565469be49b1a7851ad6f78c5
+EBUILD portage-9999.ebuild 9884 RMD160 bbf37ddcb73b4e40c886b3d2e4d3557f557dff3b SHA1 dc11cf37248bfc706424a438358abd470ce2bc34 SHA256 e62ddab6a973d95b1431d7bf9834cc015968b1e2487c1b46fea53761117caad0
+MISC ChangeLog 10942 RMD160 4144e31adb492a90044620575111653adf43f431 SHA1 41b2bea3440dd4d914961a4ad1e31df29ee00066 SHA256 0aa868f46b3a375b0d77acfda8876cf7b43fcf960e8e796b51ff4c866c8d5eeb
 MISC metadata.xml 618 RMD160 9510c974d4aa9a1383674d331a973140beb44e48 SHA1 0822478deaeb3b22358fff5c695111bfdf3ff2f6 SHA256 00ca0aa3a29ec8f82ddaf2e0f89e0b2e959131a6350f64b3c49b1125cbb32a13
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.14 (GNU/Linux)
-
-iEYEARECAAYFAkulXOgACgkQ/ejvha5XGaPKBwCfY4vm2JB6GNkPoo80oCc7JK1i
-FBAAoMhwyfZI2E+ql8AnuDgcMrwRj5XB
-=Gx15
------END PGP SIGNATURE-----
diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-9999.ebuild
new file mode 100644 (file)
index 0000000..6fbd5ff
--- /dev/null
@@ -0,0 +1,324 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-9999.ebuild,v 1.1 2010/03/25 02:17:04 sping 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 git 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=""
+PROVIDE="virtual/portage"
+SLOT="0"
+IUSE="build doc epydoc python3 selinux"
+
+python_dep="python3? ( =dev-lang/python-3* )
+       !python3? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 >=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
+}
+
+EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/portage.git"
+S="${WORKDIR}"/${PN}
+
+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
+
+       if use python3; then
+               python_set_active_version 3
+       fi
+}
+
+src_prepare() {
+       local _version="'$(cd "${S}/.git" && git describe --tags)'[1:]"
+       einfo "Setting portage.VERSION to ${_version} ..."
+       sed -i "s/^VERSION=.*/VERSION=${_version}/" 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=""
+               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"
+               # workaround for bug 282760
+               > "$S/pym/pysqlite2.py"
+               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"
+               rm "$S/pym/pysqlite2.py"
+       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
+
+       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]
+
+       echo 'Producing ChangeLog from Git history...'
+       ( cd "${S}/.git" && git log --stat > "${S}"/ChangeLog )
+       dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die 'dodoc failed'
+       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
+}