[shotwell/f17] Add patches from stable branch.
Thomas Moschny
thm at fedoraproject.org
Sun Jul 15 13:51:47 UTC 2012
commit 8d7cbf017664fc1d47a282af60d7276aadb7e38e
Author: Thomas Moschny <thm at fedoraproject.org>
Date: Sun Jul 15 15:30:59 2012 +0200
Add patches from stable branch.
shotwell-0.12.3-ticket-4805.patch | 38 +++++++++++++++++++++++++++++++++++++
shotwell-0.12.3-ticket-5527.patch | 33 ++++++++++++++++++++++++++++++++
shotwell.spec | 10 ++++++++-
3 files changed, 80 insertions(+), 1 deletions(-)
---
diff --git a/shotwell-0.12.3-ticket-4805.patch b/shotwell-0.12.3-ticket-4805.patch
new file mode 100644
index 0000000..2f27320
--- /dev/null
+++ b/shotwell-0.12.3-ticket-4805.patch
@@ -0,0 +1,38 @@
+From 51336040742ad51936c1d2d92fa1d092cad73a54 Mon Sep 17 00:00:00 2001
+From: Clint Rogers <clinton at yorba.org>
+Date: Fri, 13 Jul 2012 12:31:08 -0700
+Subject: [PATCH] Fixes #4805, relaxes an assertion that could occur when
+ attempting to remove a tombstone from a tombstone source
+ collection if the tombstone was never in the collection to
+ begin with (that is, it's already removed, so no need to
+ assert here).
+
+---
+ src/Tombstone.vala | 11 +++++++++--
+ 1 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/src/Tombstone.vala b/src/Tombstone.vala
+index 3d4e728..c71948b 100644
+--- a/src/Tombstone.vala
++++ b/src/Tombstone.vala
+@@ -34,8 +34,15 @@ public class TombstoneSourceCollection : DatabaseSourceCollection {
+ foreach (DataObject object in removed) {
+ Tombstone tombstone = (Tombstone) object;
+
+- bool is_removed = file_map.unset(tombstone.get_file());
+- assert(is_removed);
++ // do we actually have this file?
++ if (file_map.has_key(tombstone.get_file())) {
++ // yes, try to remove it.
++ bool is_removed = file_map.unset(tombstone.get_file());
++ assert(is_removed);
++ }
++ // if the hashmap didn't have the file to begin with,
++ // we're already in the state we wanted to be in, so our
++ // work is done; no need to assert.
+ }
+ }
+
+--
+1.7.7.6
+
diff --git a/shotwell-0.12.3-ticket-5527.patch b/shotwell-0.12.3-ticket-5527.patch
new file mode 100644
index 0000000..0dae339
--- /dev/null
+++ b/shotwell-0.12.3-ticket-5527.patch
@@ -0,0 +1,33 @@
+From ecd026025b78f928c06e3d0649a4f2d7f27e6f6d Mon Sep 17 00:00:00 2001
+From: Clint Rogers <clinton at yorba.org>
+Date: Tue, 10 Jul 2012 14:21:48 -0700
+Subject: [PATCH] Forces arguments to Dimensions constructor to sensible
+ default if we get here and they're negative; closes #5527.
+
+---
+ src/Dimensions.vala | 9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/Dimensions.vala b/src/Dimensions.vala
+index a695bad..027da6f 100644
+--- a/src/Dimensions.vala
++++ b/src/Dimensions.vala
+@@ -41,10 +41,11 @@ public struct Dimensions {
+ public int height;
+
+ public Dimensions(int width = 0, int height = 0) {
+- assert((width >= 0) && (height >= 0));
+-
+- this.width = width;
+- this.height = height;
++ if ((width < 0) || (height < 0))
++ warning("Tried to construct a Dimensions object with negative width or height - forcing sensible default values.");
++
++ this.width = width.clamp(0, width);
++ this.height = height.clamp(0, height);
+ }
+
+ public static Dimensions for_pixbuf(Gdk.Pixbuf pixbuf) {
+--
+1.7.7.6
+
diff --git a/shotwell.spec b/shotwell.spec
index d48935b..3221595 100644
--- a/shotwell.spec
+++ b/shotwell.spec
@@ -1,6 +1,6 @@
Name: shotwell
Version: 0.12.3
-Release: 1%{?dist}
+Release: 1%{?dist}.1
Summary: A photo organizer for the GNOME desktop
Group: Applications/Multimedia
@@ -14,6 +14,9 @@ Source1: shotwell-icons.tar.bz2
# Fix installed prefix detection when invoked as /bin/shotwell
# https://bugzilla.redhat.com/show_bug.cgi?id=812652
Patch0: shotwell-usrmove.patch
+# Patches from stable branch
+Patch1: shotwell-0.12.3-ticket-4805.patch
+Patch2: shotwell-0.12.3-ticket-5527.patch
BuildRequires: vala-devel >= 0.14
BuildRequires: LibRaw-devel
@@ -44,6 +47,8 @@ them, and share them with others.
%prep
%setup -q
%patch0 -p1 -b .usrmove
+%patch1 -p1
+%patch2 -p1
%build
./configure \
@@ -105,6 +110,9 @@ gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Sun Jul 15 2012 Thomas Moschny <thomas.moschny at gmx.de> - 0.12.3-1.1
+- Add patches from stable branch.
+
* Tue May 22 2012 Thomas Moschny <thomas.moschny at gmx.de> - 0.12.3-1
- Update to 0.12.3.
More information about the scm-commits
mailing list