summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Huber <johu@gentoo.org>2013-06-05 21:35:40 +0000
committerJohannes Huber <johu@gentoo.org>2013-06-05 21:35:40 +0000
commit8e223cc42413408e4c48a67a32556b0b96f0bbde (patch)
tree8d7364b402176c07fc92c96ccf3b9b32d0318107 /net-libs/telepathy-qt
parentRev bump 1.2.0 to force the last fix down to the users (diff)
downloadgentoo-2-8e223cc42413408e4c48a67a32556b0b96f0bbde.tar.gz
gentoo-2-8e223cc42413408e4c48a67a32556b0b96f0bbde.tar.bz2
gentoo-2-8e223cc42413408e4c48a67a32556b0b96f0bbde.zip
Revision bump. EAPI 5, migrate to non obsolete python eclass, adds upstream patch which fixes avatars stored several times when they exist spotted by Lamarque V. Souza <lamarque@gmail.com> wrt bug #472180.
(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key F3CFD2BD)
Diffstat (limited to 'net-libs/telepathy-qt')
-rw-r--r--net-libs/telepathy-qt/ChangeLog11
-rw-r--r--net-libs/telepathy-qt/files/telepathy-qt-0.9.3-avatar-duplication.patch65
-rw-r--r--net-libs/telepathy-qt/telepathy-qt-0.9.3-r1.ebuild70
3 files changed, 145 insertions, 1 deletions
diff --git a/net-libs/telepathy-qt/ChangeLog b/net-libs/telepathy-qt/ChangeLog
index 8f7ba95ff792..8d00507b2eb3 100644
--- a/net-libs/telepathy-qt/ChangeLog
+++ b/net-libs/telepathy-qt/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-libs/telepathy-qt
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/telepathy-qt/ChangeLog,v 1.20 2013/03/02 22:58:30 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/telepathy-qt/ChangeLog,v 1.21 2013/06/05 21:35:40 johu Exp $
+
+*telepathy-qt-0.9.3-r1 (05 Jun 2013)
+
+ 05 Jun 2013; Johannes Huber <johu@gentoo.org>
+ +files/telepathy-qt-0.9.3-avatar-duplication.patch,
+ +telepathy-qt-0.9.3-r1.ebuild:
+ Revision bump. EAPI 5, migrate to non obsolete python eclass, adds upstream
+ patch which fixes avatars stored several times when they exist spotted by
+ Lamarque V. Souza <lamarque@gmail.com> wrt bug #472180.
02 Mar 2013; Markos Chandras <hwoarang@gentoo.org> telepathy-qt-0.8.0.ebuild,
telepathy-qt-0.9.2.ebuild, telepathy-qt-0.9.3.ebuild:
diff --git a/net-libs/telepathy-qt/files/telepathy-qt-0.9.3-avatar-duplication.patch b/net-libs/telepathy-qt/files/telepathy-qt-0.9.3-avatar-duplication.patch
new file mode 100644
index 000000000000..4dd9a38a810f
--- /dev/null
+++ b/net-libs/telepathy-qt/files/telepathy-qt-0.9.3-avatar-duplication.patch
@@ -0,0 +1,65 @@
+From 8da9f7069929893bcee64dab22101134752fe618 Mon Sep 17 00:00:00 2001
+From: George Kiagiadakis <george.kiagiadakis@collabora.com>
+Date: Thu, 07 Feb 2013 12:37:49 +0000
+Subject: Fix storing avatars, so that they are not stored millions of times each
+
+The original problem lies in the fact that QFile::rename() does not overwrite
+existing files. Therefore it fails and the temporary file stays on the
+filesystem together with the already existing avatar file. Checking if the file
+exists before renaming solves this partially, but the problem is that this
+operation is not atomic. There can be many processes using tp-qt, fetching
+avatars at the same time from the server, and in this case we can still have
+a problem there. The final solution is to ignore a new avatar that has the same
+token as an avatar that is already on the filesystem. According to the spec,
+different avatars have different tokens, so if an avatar changes, the token
+changes as well.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=47647
+
+Reviewed-by: David Edmundson <kde@davidedmundson.co.uk>
+---
+diff --git a/TelepathyQt/contact-manager.cpp b/TelepathyQt/contact-manager.cpp
+index a67e736..dfa28bc 100644
+--- a/TelepathyQt/contact-manager.cpp
++++ b/TelepathyQt/contact-manager.cpp
+@@ -1341,17 +1341,27 @@ void ContactManager::onAvatarRetrieved(uint handle, const QString &token,
+ debug() << "Filename:" << avatarFileName;
+ debug() << "MimeType:" << mimeType;
+
+- QTemporaryFile mimeTypeFile(mimeTypeFileName);
+- mimeTypeFile.open();
+- mimeTypeFile.write(mimeType.toLatin1());
+- mimeTypeFile.setAutoRemove(false);
+- mimeTypeFile.rename(mimeTypeFileName);
+-
+- QTemporaryFile avatarFile(avatarFileName);
+- avatarFile.open();
+- avatarFile.write(data);
+- avatarFile.setAutoRemove(false);
+- avatarFile.rename(avatarFileName);
++ if (!QFile::exists(mimeTypeFileName)) {
++ QTemporaryFile mimeTypeFile(mimeTypeFileName);
++ if (mimeTypeFile.open()) {
++ mimeTypeFile.write(mimeType.toLatin1());
++ mimeTypeFile.setAutoRemove(false);
++ if (!mimeTypeFile.rename(mimeTypeFileName)) {
++ mimeTypeFile.remove();
++ }
++ }
++ }
++
++ if (!QFile::exists(avatarFileName)) {
++ QTemporaryFile avatarFile(avatarFileName);
++ if (avatarFile.open()) {
++ avatarFile.write(data);
++ avatarFile.setAutoRemove(false);
++ if (!avatarFile.rename(avatarFileName)) {
++ avatarFile.remove();
++ }
++ }
++ }
+ }
+
+ ContactPtr contact = lookupContactByHandle(handle);
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/net-libs/telepathy-qt/telepathy-qt-0.9.3-r1.ebuild b/net-libs/telepathy-qt/telepathy-qt-0.9.3-r1.ebuild
new file mode 100644
index 000000000000..053d818a4d97
--- /dev/null
+++ b/net-libs/telepathy-qt/telepathy-qt-0.9.3-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/telepathy-qt/telepathy-qt-0.9.3-r1.ebuild,v 1.1 2013/06/05 21:35:40 johu Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_5,2_6,2_7} )
+inherit base python-any-r1 cmake-utils virtualx
+
+DESCRIPTION="Qt4 bindings for the Telepathy D-Bus protocol"
+HOMEPAGE="http://telepathy.freedesktop.org/"
+SRC_URI="http://telepathy.freedesktop.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="debug farsight farstream test"
+
+RDEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+ farsight? (
+ net-libs/telepathy-farsight
+ )
+ farstream? (
+ >=net-libs/telepathy-farstream-0.2.2
+ >=net-libs/telepathy-glib-0.18.0
+ )
+ !net-libs/telepathy-qt4
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ test? (
+ dev-libs/dbus-glib
+ dev-libs/glib
+ dev-python/dbus-python
+ dev-qt/qttest:4
+ )
+"
+
+REQUIRED_USE="farsight? ( !farstream )"
+
+DOCS=( AUTHORS ChangeLog HACKING NEWS README )
+
+PATCHES=(
+ "${FILESDIR}/${P}-tp-glib-0.18-tests.patch"
+ "${FILESDIR}/${P}-avatar-duplication.patch"
+)
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable farsight)
+ $(cmake-utils_use_enable farstream)
+ $(cmake-utils_use_enable debug DEBUG_OUTPUT)
+ $(cmake-utils_use_enable test TESTS)
+ -DENABLE_EXAMPLES=OFF
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ pushd "${CMAKE_BUILD_DIR}" > /dev/null
+ Xemake test || die "tests failed"
+ popd > /dev/null
+}