diff options
author | Tiziano Müller <dev-zero@gentoo.org> | 2012-07-11 07:53:55 +0000 |
---|---|---|
committer | Tiziano Müller <dev-zero@gentoo.org> | 2012-07-11 07:53:55 +0000 |
commit | 2d44f2f884dc458f878475051bd3ee981ba9246e (patch) | |
tree | fe3c7a7f05846a6f277f8d1990359e19bf9fbba5 /net-misc/openvswitch | |
parent | Version bump. (diff) | |
download | gentoo-2-2d44f2f884dc458f878475051bd3ee981ba9246e.tar.gz gentoo-2-2d44f2f884dc458f878475051bd3ee981ba9246e.tar.bz2 gentoo-2-2d44f2f884dc458f878475051bd3ee981ba9246e.zip |
Fix python-tools installation, correct dependency (need twisted-web as well) and do schema migration in pkg_config if database already exists (bug #424013).
(Portage version: 2.1.11/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/openvswitch')
-rw-r--r-- | net-misc/openvswitch/ChangeLog | 10 | ||||
-rw-r--r-- | net-misc/openvswitch/openvswitch-1.6.1-r1.ebuild (renamed from net-misc/openvswitch/openvswitch-1.6.1.ebuild) | 24 |
2 files changed, 25 insertions, 9 deletions
diff --git a/net-misc/openvswitch/ChangeLog b/net-misc/openvswitch/ChangeLog index 10b2276f2cb4..8c47df4a1bc9 100644 --- a/net-misc/openvswitch/ChangeLog +++ b/net-misc/openvswitch/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-misc/openvswitch # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/ChangeLog,v 1.1 2012/06/27 08:49:35 dev-zero Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/ChangeLog,v 1.2 2012/07/11 07:53:55 dev-zero Exp $ + +*openvswitch-1.6.1-r1 (11 Jul 2012) + + 11 Jul 2012; Tiziano Müller <dev-zero@gentoo.org> + +openvswitch-1.6.1-r1.ebuild, -openvswitch-1.6.1.ebuild: + Fix python-tools installation, correct dependency (need twisted-web as well) + and do schema migration in pkg_config if database already exists (bug + #424013). *openvswitch-1.6.1 (27 Jun 2012) diff --git a/net-misc/openvswitch/openvswitch-1.6.1.ebuild b/net-misc/openvswitch/openvswitch-1.6.1-r1.ebuild index 41fdd1aa18ae..b1092ce39e8d 100644 --- a/net-misc/openvswitch/openvswitch-1.6.1.ebuild +++ b/net-misc/openvswitch/openvswitch-1.6.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/openvswitch-1.6.1.ebuild,v 1.1 2012/06/27 08:49:35 dev-zero Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/openvswitch-1.6.1-r1.ebuild,v 1.1 2012/07/11 07:53:55 dev-zero Exp $ EAPI=4 @@ -20,6 +20,7 @@ IUSE="debug monitor +pyside +ssl" RDEPEND="ssl? ( dev-libs/openssl ) monitor? ( dev-python/twisted dev-python/twisted-conch + dev-python/twisted-web pyside? ( dev-python/pyside ) !pyside? ( dev-python/PyQt4 ) net-zope/zope-interface ) @@ -60,6 +61,11 @@ src_compile() { src_install() { default + if use monitor ; then + insinto $(python_get_sitedir) + doins -r "${D}"/usr/share/openvswitch/python/* + rm -r "${D}/usr/share/openvswitch/python" + fi # not working without the brcompat_mod kernel module which did not get # included in the kernel and we can't build it anymore rm "${D}/usr/sbin/ovs-brcompatd" "${D}/usr/share/man/man8/ovs-brcompatd.8" @@ -81,24 +87,26 @@ src_install() { } pkg_postinst() { - use monitor && python_mod_optimize /usr/share/openvswitch/ovsdbmonitor - python_mod_optimize /usr/share/openvswitch/python + use monitor && python_mod_optimize /usr/share/openvswitch/ovsdbmonitor ovs ovstest elog "Use the following command to create an initial database for ovsdb-server:" elog " emerge --config =${CATEGORY}/${PF}" elog "(will create a database in /etc/openvswitch/conf.db)" + elog "or to convert the database to the current schema after upgrading." } pkg_postrm() { - use monitor && python_mod_cleanup /usr/share/openvswitch/ovsdbmonitor - python_mod_cleanup /usr/share/openvswitch/python + use monitor && python_mod_cleanup /usr/share/openvswitch/ovsdbmonitor ovs ovstest } pkg_config() { local db="${PREFIX}/etc/openvswitch/conf.db" if [ -e "${db}" ] ; then - eerror "Database already exists in ${db}, please remove it first." - die "${db} already exists" + einfo "Database '${db}' already exists, doing schema migration..." + einfo "(if the migration fails, make sure that ovsdb-server is not running)" + "${PREFIX}/usr/bin/ovsdb-tool" convert "${db}" "${PREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "converting database failed" + else + einfo "Creating new database '${db}'..." + "${PREFIX}/usr/bin/ovsdb-tool" create "${db}" "${PREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "creating database failed" fi - "${PREFIX}/usr/bin/ovsdb-tool" create "${db}" /usr/share/openvswitch/vswitch.ovsschema } |