summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-01-29 17:37:12 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-01-29 17:37:12 +0000
commit7e24a401ab03df104230d2f4e8d3da9b863d12aa (patch)
treeed28a200877dccfbdf34138cd876c0cc1c1cc2b5 /app-admin/python-updater
parentFix my sentence (diff)
downloadgentoo-2-7e24a401ab03df104230d2f4e8d3da9b863d12aa.tar.gz
gentoo-2-7e24a401ab03df104230d2f4e8d3da9b863d12aa.tar.bz2
gentoo-2-7e24a401ab03df104230d2f4e8d3da9b863d12aa.zip
Backport fix for bug #288361.
(Portage version: 15217-svn/cvs/Linux x86_64)
Diffstat (limited to 'app-admin/python-updater')
-rw-r--r--app-admin/python-updater/ChangeLog8
-rw-r--r--app-admin/python-updater/files/python-updater-0.7-fix_import.patch49
-rw-r--r--app-admin/python-updater/python-updater-0.7-r1.ebuild33
3 files changed, 89 insertions, 1 deletions
diff --git a/app-admin/python-updater/ChangeLog b/app-admin/python-updater/ChangeLog
index 262751b7c624..6189bfb78d42 100644
--- a/app-admin/python-updater/ChangeLog
+++ b/app-admin/python-updater/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-admin/python-updater
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/python-updater/ChangeLog,v 1.44 2010/01/29 17:17:00 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/python-updater/ChangeLog,v 1.45 2010/01/29 17:37:11 arfrever Exp $
+
+*python-updater-0.7-r1 (29 Jan 2010)
+
+ 29 Jan 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ +python-updater-0.7-r1.ebuild, +files/python-updater-0.7-fix_import.patch:
+ Backport fix for bug #288361.
*python-updater-0.8 (29 Jan 2010)
diff --git a/app-admin/python-updater/files/python-updater-0.7-fix_import.patch b/app-admin/python-updater/files/python-updater-0.7-fix_import.patch
new file mode 100644
index 000000000000..bf46ce4cae8f
--- /dev/null
+++ b/app-admin/python-updater/files/python-updater-0.7-fix_import.patch
@@ -0,0 +1,49 @@
+--- python-updater
++++ python-updater
+@@ -34,7 +34,6 @@
+ VERBOSE=0
+ PKGS_TO_REMERGE=""
+ PKGS_COUNT_REMERGE=0
+-PORTAGE_PYTHON="/usr/bin/python"
+ PYTHON_VERSIONS="3.2 3.1 3.0 2.7 2.6 2.5 2.4 2.3 2.2 2.1"
+
+ SUPPORTED_PMS="portage pkgcore paludis"
+@@ -132,26 +131,6 @@
+ return 1
+ }
+
+-# get_portage_python(oldpy,newpy)
+-# Find where portage is, in pythonX.Y or somewhere else?
+-get_portage_python() {
+- if [[ $# -lt 2 ]]; then
+- eerror "get_portage_python(): Missing arguments."
+- exit 1
+- fi
+- local oldpy="$1" newpy="$2"
+-
+- pybin=/usr/bin/python
+- for py in ${pybin} ${pybin}${oldpy} ${pybin}${newpy}; do
+- if ${py} -c "import portage" > /dev/null 2>&1; then
+- echo -n "${py}"
+- return 0
+- fi
+- done
+- eerror "Couldn't determine portage python"
+- return 1
+-}
+-
+ # get_portage_portdir()
+ # Check if portage knows about PORTDIR and return it
+ get_portage_portdir() {
+@@ -294,11 +273,6 @@
+ fi
+ fi
+
+-# Get portage python
+-PORTAGE_PYTHON="$(get_portage_python ${OLD_PY_VER} ${NEW_PY_VER})"
+-[[ $? != 0 ]] && exit 1
+-
+-
+ einfo "Starting Python Updater from ${OLD_PY_VER} to ${NEW_PY_VER} :"
+ if [[ CHECK_SONAME -ne 0 ]]; then
+ if ! type -P scanelf >/dev/null 2>&1; then
diff --git a/app-admin/python-updater/python-updater-0.7-r1.ebuild b/app-admin/python-updater/python-updater-0.7-r1.ebuild
new file mode 100644
index 000000000000..e6ff4a284f39
--- /dev/null
+++ b/app-admin/python-updater/python-updater-0.7-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/python-updater/python-updater-0.7-r1.ebuild,v 1.1 2010/01/29 17:37:11 arfrever Exp $
+
+inherit eutils
+
+DESCRIPTION="Script used to remerge python packages when changing Python version."
+HOMEPAGE="http://www.gentoo.org/proj/en/Python"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+RDEPEND="!<dev-lang/python-2.3.6-r2
+ >=sys-apps/portage-2.1.2"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Delete vulnerable code.
+ epatch "${FILESDIR}/${P}-fix_import.patch"
+}
+
+src_install()
+{
+ dosbin ${PN} || die "dosbin failed"
+ doman ${PN}.1 || die "doman failed"
+ dodoc AUTHORS ChangeLog || die "dodoc failed"
+}