From 4aac9dedf88ae37e449e8adef87987d6013323b5281254ce082f215cc066c8bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 28 Jan 2015 17:31:12 +0000 Subject: [PATCH 1/2] Accepting request 283216 from home:ZaWertun:branches:shells OBS-URL: https://build.opensuse.org/request/show/283216 OBS-URL: https://build.opensuse.org/package/show/shells/fish?expand=0&rev=7 --- ...or_command-not-found_command_on_suse.patch | 49 +++++++++++++++++++ fish.changes | 6 +++ fish.spec | 5 +- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 check_for_command-not-found_command_on_suse.patch diff --git a/check_for_command-not-found_command_on_suse.patch b/check_for_command-not-found_command_on_suse.patch new file mode 100644 index 0000000..9ecfd79 --- /dev/null +++ b/check_for_command-not-found_command_on_suse.patch @@ -0,0 +1,49 @@ +From 27b6fe682db3018f3ccbaf6f6f25b4ef81869316 Mon Sep 17 00:00:00 2001 +From: David Adam +Date: Sun, 2 Feb 2014 21:39:17 +0800 +Subject: [PATCH] Squashed commit of the following: + +commit d81ae2665fb7ff5123d8472e1d40d7d57fb4b291 +Author: Max Gonzih +Date: Sun Feb 2 16:22:18 2014 +0300 + + Check for command-not-found command on suse + +commit 004b794c82d79bc9463cdb52784b9b5ea49f1c76 +Author: Max Gonzih +Date: Sun Feb 2 14:04:41 2014 +0300 + + Fix cnf handler for Suse and Fedora + + fixes #1208 +--- + share/functions/__fish_config_interactive.fish | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish +index b9afedd..9ff7edc 100644 +--- a/share/functions/__fish_config_interactive.fish ++++ b/share/functions/__fish_config_interactive.fish +@@ -237,8 +237,20 @@ function __fish_config_interactive -d "Initializations that should be performed + # Remove fish_command_not_found_setup so we only execute this once + functions --erase __fish_command_not_found_setup + +- # First check in /usr/lib, this is where modern Ubuntus place this command +- if test -f /usr/lib/command-not-found ++ # First check if we are on OpenSUSE since SUSE's handler has no options ++ # and expects first argument to be a command and second database ++ # also check if there is command-not-found command. ++ if begin; test -f /etc/SuSE-release; and type -p command-not-found > /dev/null 2> /dev/null; end ++ function __fish_command_not_found_handler --on-event fish_command_not_found ++ /usr/bin/command-not-found $argv ++ end ++ # Check for Fedora's handler ++ else if test -f /usr/libexec/pk-command-not-found ++ function __fish_command_not_found_handler --on-event fish_command_not_found ++ /usr/libexec/pk-command-not-found -- $argv ++ end ++ # Check in /usr/lib, this is where modern Ubuntus place this command ++ else if test -f /usr/lib/command-not-found + function __fish_command_not_found_handler --on-event fish_command_not_found + /usr/lib/command-not-found -- $argv + end diff --git a/fish.changes b/fish.changes index b66cf7d..4ec73a7 100644 --- a/fish.changes +++ b/fish.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 28 17:26:37 UTC 2015 - zawertun@gmail.com + +- Added patch against issue #1208 + (https://github.com/fish-shell/fish-shell/issues/1208) + ------------------------------------------------------------------- Mon Dec 1 10:08:12 UTC 2014 - seanpwatson@live.com diff --git a/fish.spec b/fish.spec index b271c65..bba3341 100644 --- a/fish.spec +++ b/fish.spec @@ -1,7 +1,7 @@ # # spec file for package fish # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,6 +24,8 @@ License: GPL-2.0 Group: System/Shells Url: http://fishshell.com/ Source: http://fishshell.com/files/%{version}/fish-%{version}.tar.gz +# PATCH-FIX-UPSTREAM check_for_command-not-found_command_on_suse.patch gh#fish-shell/fish-shell#1208 +Patch0: check_for_command-not-found_command_on_suse.patch BuildRequires: autoconf BuildRequires: doxygen BuildRequires: gcc-c++ @@ -41,6 +43,7 @@ discoverability. The language syntax is simple but incompatible with other shell %prep %setup -q +%patch0 -p1 %build autoconf From 592b26e04ef1eabf5c9f88507a98996eebb852f8988a84de2890c64e337b5363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 28 Jan 2015 17:36:57 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/shells/fish?expand=0&rev=8 --- fish.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish.changes b/fish.changes index 4ec73a7..d78cce2 100644 --- a/fish.changes +++ b/fish.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Wed Jan 28 17:26:37 UTC 2015 - zawertun@gmail.com -- Added patch against issue #1208 +- Added check_for_command-not-found_command_on_suse.patch (https://github.com/fish-shell/fish-shell/issues/1208) -------------------------------------------------------------------