diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-10-03 21:07:20 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-10-03 21:07:20 +0000 |
commit | 90c7fdfb2785fba8119dc96a6a66c612f3f8e0ae (patch) | |
tree | aa0415829e68963cf92487cfb7cd2dde9ed9e8bd /dev-python | |
parent | Version bump (diff) | |
download | gentoo-2-90c7fdfb2785fba8119dc96a6a66c612f3f8e0ae.tar.gz gentoo-2-90c7fdfb2785fba8119dc96a6a66c612f3f8e0ae.tar.bz2 gentoo-2-90c7fdfb2785fba8119dc96a6a66c612f3f8e0ae.zip |
Fix unslotted python-exec deps in vardb when >=python-exec-2.0-r1 is installed.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/python-exec/ChangeLog | 9 | ||||
-rw-r--r-- | dev-python/python-exec/python-exec-2.0-r1.ebuild (renamed from dev-python/python-exec/python-exec-2.0.ebuild) | 32 | ||||
-rw-r--r-- | dev-python/python-exec/python-exec-2.9999.ebuild | 32 |
3 files changed, 68 insertions, 5 deletions
diff --git a/dev-python/python-exec/ChangeLog b/dev-python/python-exec/ChangeLog index 9c94c9475f92..155cf184b78b 100644 --- a/dev-python/python-exec/ChangeLog +++ b/dev-python/python-exec/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-python/python-exec # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/python-exec/ChangeLog,v 1.52 2013/09/29 14:47:10 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/python-exec/ChangeLog,v 1.53 2013/10/03 21:07:20 mgorny Exp $ + +*python-exec-2.0-r1 (03 Oct 2013) + + 03 Oct 2013; Michał Górny <mgorny@gentoo.org> +python-exec-2.0-r1.ebuild, + -python-exec-2.0.ebuild, python-exec-2.9999.ebuild: + Fix unslotted python-exec deps in vardb when >=python-exec-2.0-r1 is + installed. 29 Sep 2013; Michał Górny <mgorny@gentoo.org> -python-exec-0.2.ebuild, -python-exec-0.3.ebuild: diff --git a/dev-python/python-exec/python-exec-2.0.ebuild b/dev-python/python-exec/python-exec-2.0-r1.ebuild index 9d887e19fee2..2a1620b7faa3 100644 --- a/dev-python/python-exec/python-exec-2.0.ebuild +++ b/dev-python/python-exec/python-exec-2.0-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/python-exec/python-exec-2.0.ebuild,v 1.1 2013/09/17 16:05:41 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/python-exec/python-exec-2.0-r1.ebuild,v 1.1 2013/10/03 21:07:20 mgorny Exp $ EAPI=5 @@ -8,7 +8,7 @@ EAPI=5 inherit python-utils-r1 PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" ) -inherit autotools-utils python-r1 +inherit autotools-utils python-r1 versionator DESCRIPTION="Python script wrapper" HOMEPAGE="https://bitbucket.org/mgorny/python-exec/" @@ -33,3 +33,31 @@ src_configure() { autotools-utils_src_configure } + +cleanup_vardb_deps() { + local v + for v in ${REPLACING_VERSIONS}; do + # if 2.0-r1+ was installed already, no need for cleaning up again. + if version_is_at_least 2.0-r1 ${v}; then + return 0 + fi + done + + local f files=() + for f in "${EROOT%/}"/var/db/pkg/*/*/*DEPEND; do + if grep -q 'dev-python/python-exec\[' "${f}"; then + files+=( "${f}" ) + fi + done + + if [[ ${files[@]} ]]; then + ebegin "Fixing unslotted python-exec dependencies in installed packages" + sed -i -e 's,dev-python/python-exec\[,dev-python/python-exec:0[,' \ + "${files[@]}" + eend ${?} + fi +} + +pkg_postinst() { + cleanup_vardb_deps +} diff --git a/dev-python/python-exec/python-exec-2.9999.ebuild b/dev-python/python-exec/python-exec-2.9999.ebuild index 95eaeefa69ee..a5e071541ecc 100644 --- a/dev-python/python-exec/python-exec-2.9999.ebuild +++ b/dev-python/python-exec/python-exec-2.9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/python-exec/python-exec-2.9999.ebuild,v 1.1 2013/09/17 16:05:41 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/python-exec/python-exec-2.9999.ebuild,v 1.2 2013/10/03 21:07:20 mgorny Exp $ EAPI=5 @@ -16,7 +16,7 @@ inherit git-2 inherit python-utils-r1 PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" ) -inherit autotools-utils python-r1 +inherit autotools-utils python-r1 versionator DESCRIPTION="Python script wrapper" HOMEPAGE="https://bitbucket.org/mgorny/python-exec/" @@ -46,3 +46,31 @@ src_configure() { autotools-utils_src_configure } + +cleanup_vardb_deps() { + local v + for v in ${REPLACING_VERSIONS}; do + # if 2.0-r1+ was installed already, no need for cleaning up again. + if version_is_at_least 2.0-r1 ${v}; then + return 0 + fi + done + + local f files=() + for f in "${EROOT%/}"/var/db/pkg/*/*/*DEPEND; do + if grep -q 'dev-python/python-exec\[' "${f}"; then + files+=( "${f}" ) + fi + done + + if [[ ${files[@]} ]]; then + ebegin "Fixing unslotted python-exec dependencies in installed packages" + sed -i -e 's,dev-python/python-exec\[,dev-python/python-exec:0[,' \ + "${files[@]}" + eend ${?} + fi +} + +pkg_postinst() { + cleanup_vardb_deps +} |