git » transmission.git » commit 389b96c

Fix 2.76 regression; probably fixes FS#33572.

author Evangelos Foutras
2013-01-26 16:23:53 UTC
committer Evangelos Foutras
2013-01-26 16:23:53 UTC
parent a93a9c7cda757b2d7326a322547f8733460119b9

Fix 2.76 regression; probably fixes FS#33572.

PKGBUILD +8 -3
transmission-2.76-fix-regression.patch +26 -0

diff --git a/PKGBUILD b/PKGBUILD
index 49a1aee..2baffb9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,22 +3,27 @@
 pkgbase=transmission
 pkgname=('transmission-cli' 'transmission-gtk' 'transmission-qt')
 pkgver=2.76
-pkgrel=1
+pkgrel=2
 arch=('i686' 'x86_64')
 url="http://www.transmissionbt.com/"
 license=('MIT')
 makedepends=('gtk3' 'intltool' 'curl' 'qt' 'libevent')
 source=(http://mirrors.m0k.org/transmission/files/$pkgbase-$pkgver.tar.xz
         transmissiond transmissiond.conf transmission.systemd
-        transmission.tmpfiles)
+        transmission.tmpfiles
+        transmission-2.76-fix-regression.patch)
 md5sums=('9abbffe29ce9b5ee68a116d293c51111'
          '7d6186ee2a852ae3d44980f05063e194'
          'db72b02fee139e8ab416324e6c044d76'
          '5c289c8901221a94be74665368ab5c2c'
-         '23f2320361ad54373c3a4551ef634fe8')
+         '23f2320361ad54373c3a4551ef634fe8'
+         '894b1332cf651c15d593aed0b51dbdd6')
 build() {
   cd $pkgbase-$pkgver
 
+  # https://trac.transmissionbt.com/ticket/5215
+  patch -Np2 -i "$srcdir/transmission-2.76-fix-regression.patch"
+
   ./configure --prefix=/usr
   make
   pushd qt
diff --git a/transmission-2.76-fix-regression.patch b/transmission-2.76-fix-regression.patch
new file mode 100644
index 0000000..b3fb734
--- /dev/null
+++ b/transmission-2.76-fix-regression.patch
@@ -0,0 +1,26 @@
+Index: branches/2.7x/cli/cli.c
+===================================================================
+--- branches/2.7x/cli/cli.c	(revision 13784)
++++ branches/2.7x/cli/cli.c	(revision 13794)
+@@ -268,14 +268,12 @@
+     {
+       if (!tr_fileExists (str, NULL))
+-        tr_mkdirp (str, 0700);
+-
+-      if (tr_fileExists (str, NULL))
+         {
+-          tr_bencDictAddStr (&settings, TR_PREFS_KEY_DOWNLOAD_DIR, str);
+-        }
+-      else
+-        {
+-          fprintf (stderr, "Unable to create download directory \"%s\"!\n", str);
+-          return EXIT_FAILURE;
++          tr_mkdirp (str, 0700);
++
++          if (!tr_fileExists (str, NULL))
++            {
++              fprintf (stderr, "Unable to create download directory \"%s\"!\n", str);
++              return EXIT_FAILURE;
++            }
+         }
+     }