net-mail/offlineimap: only show postinst message for new installs
authorTim Harder <radhermit@gentoo.org>
Tue, 2 Aug 2016 16:11:22 +0000 (12:11 -0400)
committerTim Harder <radhermit@gentoo.org>
Tue, 2 Aug 2016 16:20:18 +0000 (12:20 -0400)
Also, fix dev-python/six dep to use proper python versions.

net-mail/offlineimap/offlineimap-7.0.3-r1.ebuild

index 6de39f8cf15a192dcfd5b8380489d86b3647633e..ed8d2344205297fe4eb1a6e531df0dac1372d2d9 100644 (file)
@@ -6,7 +6,7 @@ EAPI=6
 
 # Normally you need only one version of this.
 DISTUTILS_SINGLE_IMPL=1
-PYTHON_COMPAT=( python2_7 python3_4 )
+PYTHON_COMPAT=( python{2_7,3_4} )
 PYTHON_REQ_USE="threads,sqlite,ssl?"
 
 inherit distutils-r1
@@ -20,7 +20,7 @@ SLOT="0"
 KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
 IUSE="doc ssl"
 
-RDEPEND="dev-python/six"
+RDEPEND="dev-python/six[${PYTHON_USEDEP}]"
 DEPEND="doc? ( app-text/asciidoc )"
 
 # see http://pogma.com/2009/09/09/snow-leopard-and-offlineimap/ and bug 284925
@@ -41,12 +41,14 @@ src_install() {
 }
 
 pkg_postinst() {
-       elog "You will need to configure offlineimap by creating ~/.offlineimaprc"
-       elog "Sample configurations are in /usr/share/doc/${PF}/"
-       elog ""
-       elog "If you connect via ssl/tls and don't use CA cert checking, it will"
-       elog "display the server's cert fingerprint and require you to add it to the"
-       elog "configuration file to be sure it connects to the same server every"
-       elog "time. This serves to help fixing CVE-2010-4532 (offlineimap doesn't"
-       elog "check SSL server certificate) in cases where you have no CA cert."
+       if [[ -z ${REPLACING_VERSIONS} ]]; then
+               elog "You will need to configure offlineimap by creating ~/.offlineimaprc"
+               elog "Sample configurations are in /usr/share/doc/${PF}/"
+               elog ""
+               elog "If you connect via ssl/tls and don't use CA cert checking, it will"
+               elog "display the server's cert fingerprint and require you to add it to the"
+               elog "configuration file to be sure it connects to the same server every"
+               elog "time. This serves to help fixing CVE-2010-4532 (offlineimap doesn't"
+               elog "check SSL server certificate) in cases where you have no CA cert."
+       fi
 }