[SCM] telepathy-qt4 packaging branch, master, updated. a8f2f88cda0b83bedd848efe106e5c335f495d7f
Diane Trout
diane-guest at alioth.debian.org
Tue Jul 16 18:54:10 UTC 2013
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kde-telepathy/telepathy-qt4.git;a=commitdiff;h=a8f2f88
The following commit has been merged in the master branch:
commit a8f2f88cda0b83bedd848efe106e5c335f495d7f
Author: Diane Trout <diane at ghic.org>
Date: Tue Jul 16 11:53:38 2013 -0700
Add fix_storing_avatars.patch. Fixes issue storing avatars multiple times.
---
debian/changelog | 6 ++--
debian/patches/fix_storing_avatars.patch | 55 ++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index c520bb9..909f846 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-telepathy-qt (0.9.3-1) UNRELEASED; urgency=low
+telepathy-qt (0.9.3-2) UNRELEASED; urgency=low
* Team upload.
@@ -17,6 +17,8 @@ telepathy-qt (0.9.3-1) UNRELEASED; urgency=low
* Update Vcs-* fields to canonical URIs.
* Update Standards-Version: 3.9.4. No changes needed.
* Add Multi-Arch: same to libtelepathy-qt4-dbg.
+ * Add fix_storing_avatars.patch. Fixes issue storing avatars
+ multiple times.
[ Michał Zając ]
* Drop fvisibility-inlines-hidden.patch - went upstream
@@ -31,7 +33,7 @@ telepathy-qt (0.9.3-1) UNRELEASED; urgency=low
it.
* Update symbols file with current amd64 build.
- -- Diane Trout <diane at ghic.org> Sat, 08 Jun 2013 23:23:32 -0700
+ -- Diane Trout <diane at ghic.org> Tue, 16 Jul 2013 11:17:57 -0700
telepathy-qt (0.9.1-4) unstable; urgency=low
diff --git a/debian/patches/fix_storing_avatars.patch b/debian/patches/fix_storing_avatars.patch
new file mode 100644
index 0000000..7afbdf7
--- /dev/null
+++ b/debian/patches/fix_storing_avatars.patch
@@ -0,0 +1,55 @@
+Author: George Kiagiadakis <george.kiagiadakis at collabora.com>
+Description: 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.
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=47647
+Origin: upstream, http://cgit.freedesktop.org/telepathy/telepathy-qt4/commit/?id=8da9f7069929893bcee64dab22101134752fe618
+--- a/TelepathyQt/contact-manager.cpp
++++ b/TelepathyQt/contact-manager.cpp
+@@ -1341,17 +1341,27 @@
+ debug() << "Filename:" << avatarFileName;
+ debug() << "MimeType:" << mimeType;
+
+- QTemporaryFile mimeTypeFile(mimeTypeFileName);
+- mimeTypeFile.open();
+- mimeTypeFile.write(mimeType.toLatin1());
+- mimeTypeFile.setAutoRemove(false);
+- mimeTypeFile.rename(mimeTypeFileName);
++ if (!QFile::exists(mimeTypeFileName)) {
++ QTemporaryFile mimeTypeFile(mimeTypeFileName);
++ if (mimeTypeFile.open()) {
++ mimeTypeFile.write(mimeType.toLatin1());
++ mimeTypeFile.setAutoRemove(false);
++ if (!mimeTypeFile.rename(mimeTypeFileName)) {
++ mimeTypeFile.remove();
++ }
++ }
++ }
+
+- QTemporaryFile avatarFile(avatarFileName);
+- avatarFile.open();
+- avatarFile.write(data);
+- avatarFile.setAutoRemove(false);
+- avatarFile.rename(avatarFileName);
++ 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);
diff --git a/debian/patches/series b/debian/patches/series
index e505833..fbed28c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+fix_storing_avatars.patch
link-against-gobject.patch
--
telepathy-qt4 packaging
More information about the pkg-kde-commits
mailing list