[arch-commits] Commit in catfish/trunk (PKGBUILD catfish.install fixes.patch)

Alexander Rødseth arodseth at archlinux.org
Wed Oct 22 07:35:38 UTC 2014


    Date: Wednesday, October 22, 2014 @ 09:35:37
  Author: arodseth
Revision: 121204

upgpkg: catfish 1.2.2-2

Added:
  catfish/trunk/fixes.patch
Modified:
  catfish/trunk/PKGBUILD
  catfish/trunk/catfish.install

-----------------+
 PKGBUILD        |   14 +++++++----
 catfish.install |    8 ++++--
 fixes.patch     |   67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 81 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-10-22 07:33:53 UTC (rev 121203)
+++ PKGBUILD	2014-10-22 07:35:37 UTC (rev 121204)
@@ -1,11 +1,12 @@
 # $Id$
 # Maintainer: Alexander Rødseth <rodseth at gmail.com>
 # Contributor: Jaroslav Lichtblau <dragonlord at aur.archlinux.org>
-# Contributor: Alexander Fehr <pizzapunk gmail com>
+# Contributor: Alexander Fehr <pizzapunk at gmail.com>
+# Contributor: Pantelis Panayiotou <p.panayiotou at gmail.com>
 
 pkgname=catfish
 pkgver=1.2.2
-pkgrel=1
+pkgrel=2
 pkgdesc='Versatile file searching tool'
 arch=('any')
 url='https://launchpad.net/catfish-search'
@@ -19,14 +20,17 @@
             'tracker: fulltext search'
             'strigi: fulltext search'
             'pinot: fulltext search')
-source=("https://launchpad.net/catfish-search/${pkgver%.*}/$pkgver/+download/$pkgname-$pkgver.tar.bz2")
-sha256sums=('0e92844e761207b3d3086c45b26fccf83f0ebced741e1af33d8590779f25eedf')
+source=("https://launchpad.net/catfish-search/${pkgver%.*}/$pkgver/+download/$pkgname-$pkgver.tar.bz2"
+        'fixes.patch')
+sha256sums=('0e92844e761207b3d3086c45b26fccf83f0ebced741e1af33d8590779f25eedf'
+            'cc2f9bf1e964e1f41af19d1f0081189568229765df365fc1103c30aab5448b5f')
 
 prepare() {
   cd "$pkgname-$pkgver"
 
-  sed -i '1s/python/python2/' {bin,catfish,catfish_lib}/*.py build.py
+  sed -i '1s|python|python2|' {bin,catfish,catfish_lib}/*.py build.py
   sed -i 's|ln -sf $(PREFIX)/share|ln -sf ..|' Makefile.in.in
+  patch -p1 -i "$srcdir/fixes.patch"
 }
 
 build() {

Modified: catfish.install
===================================================================
--- catfish.install	2014-10-22 07:33:53 UTC (rev 121203)
+++ catfish.install	2014-10-22 07:35:37 UTC (rev 121204)
@@ -1,11 +1,13 @@
 post_install() {
-	xdg-icon-resource forceupdate
+  xdg-icon-resource forceupdate
 }
 
 post_upgrade() {
-	post_install
+  post_install
 }
 
 post_remove() {
-	post_install
+  post_install
 }
+
+# vim:set ts=2 sw=2 et:

Added: fixes.patch
===================================================================
--- fixes.patch	                        (rev 0)
+++ fixes.patch	2014-10-22 07:35:37 UTC (rev 121204)
@@ -0,0 +1,67 @@
+diff -aur catfish-1.2.2/catfish/CatfishWindow.py catfish-1.2.2.new/catfish/CatfishWindow.py
+--- catfish-1.2.2/catfish/CatfishWindow.py	2014-10-12 13:55:12.152362617 +0300
++++ catfish-1.2.2.new/catfish/CatfishWindow.py	2014-10-12 13:56:16.050600001 +0300
+@@ -34,7 +34,7 @@
+ import logging
+ logger = logging.getLogger('catfish')
+ 
+-from catfish_lib import Window, CatfishSettings, SudoDialog, helpers
++from catfish_lib import catfishconfig, Window, CatfishSettings, SudoDialog, helpers
+ from catfish.AboutCatfishDialog import AboutCatfishDialog
+ from catfish.CatfishSearchEngine import *
+ 
+@@ -226,7 +226,9 @@
+             locate, locate_path, locate_date = self.check_locate()
+ 
+             self.update_index_database.set_label("<tt>%s</tt>" % locate_path)
+-            if os.path.isfile(locate_path):
++            if not os.access(os.path.dirname(locate_path), os.R_OK):
++                modified = _("Unknown")
++            elif os.path.isfile(locate_path):
+                 modified = locate_date.strftime("%x %X")
+             else:
+                 modified = _("Never")
+@@ -452,8 +454,10 @@
+             return None
+         path = os.path.realpath(path)
+         locate = os.path.basename(path)
+-        db = os.path.join('/var/lib', locate, locate + '.db')
+-        if os.path.isfile(db):
++        db = catfishconfig.get_locate_db_path()
++        if not os.access(os.path.dirname(db), os.R_OK):
++            modified = time.time()
++        elif os.path.isfile(db):
+             modified = os.path.getmtime(db)
+         else:
+             modified = 0
+diff -aur catfish-1.2.2/catfish_lib/catfishconfig.py catfish-1.2.2.new/catfish_lib/catfishconfig.py
+--- catfish-1.2.2/catfish_lib/catfishconfig.py	2014-10-12 13:55:12.155696032 +0300
++++ catfish-1.2.2.new/catfish_lib/catfishconfig.py	2014-10-12 13:56:36.334431598 +0300
+@@ -20,11 +20,14 @@
+     'project_path_not_found',
+     'get_data_file',
+     'get_data_path',
++    'get_locate_db_path',
+ ]
+ 
+ # Where your project will look for your data (for instance, images and ui
+ # files). By default, this is ../data, relative your trunk layout
+ __catfish_data_directory__ = '../data/'
++# Location of locate.db file
++__locate_db_path__ = '/var/lib/mlocate/mlocate.db'
+ __license__ = 'GPL-2'
+ __version__ = '1.2.2'
+ 
+@@ -64,6 +67,12 @@
+     return abs_data_path
+ 
+ 
++def get_locate_db_path():
++    """Return the location of the locate.db file
++    """
++    return __locate_db_path__
++
++
+ def get_version():
+     """Return the program version number."""
+     return __version__



More information about the arch-commits mailing list