From 5fad4e034b611f794326eb6298516ba5dc1631b4 Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Thu, 3 Oct 2013 20:10:21 +0000 Subject: Linux: fix calls to "which" in maintainer scripts to be non-fatal "which" doesn't provide useful error messages on errors. When failure to find a program is fatal, we explicitly print an error message explaining the problem. Some failure to find a program are actually intended to be non-fatal, e.g. update-menus. BUG=303624 R=mmoss@chromium.org Review URL: https://codereview.chromium.org/25447004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226825 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/installer/linux/common/postinst.include | 6 +++--- chrome/installer/linux/common/prerm.include | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'chrome/installer/linux/common') diff --git a/chrome/installer/linux/common/postinst.include b/chrome/installer/linux/common/postinst.include index 1ddc7a22..d286b53 100644 --- a/chrome/installer/linux/common/postinst.include +++ b/chrome/installer/linux/common/postinst.include @@ -1,5 +1,5 @@ # Add icons to the system icons -XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null`" +XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null || true`" if [ ! -x "$XDG_ICON_RESOURCE" ]; then echo "Error: Could not find xdg-icon-resource" >&2 exit 1 @@ -10,8 +10,8 @@ for icon in "@@INSTALLDIR@@/product_logo_"*.png; do done # Add an entry to the system menu -XDG_DESKTOP_MENU="`which xdg-desktop-menu 2> /dev/null`" -UPDATE_MENUS="`which update-menus 2> /dev/null`" +XDG_DESKTOP_MENU="`which xdg-desktop-menu 2> /dev/null || true`" +UPDATE_MENUS="`which update-menus 2> /dev/null || true`" if [ ! -x "$XDG_DESKTOP_MENU" ]; then echo "Error: Could not find xdg-desktop-menu" >&2 exit 1 diff --git a/chrome/installer/linux/common/prerm.include b/chrome/installer/linux/common/prerm.include index 3e6f9d7..e70dfdf 100644 --- a/chrome/installer/linux/common/prerm.include +++ b/chrome/installer/linux/common/prerm.include @@ -1,5 +1,5 @@ # Remove icons from the system icons -XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null`" +XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null || true`" if [ ! -x "$XDG_ICON_RESOURCE" ]; then echo "Error: Could not find xdg-icon-resource" >&2 exit 1 @@ -10,8 +10,8 @@ for icon in "@@INSTALLDIR@@/product_logo_"*.png; do done # Remove the entry from the system menu -XDG_DESKTOP_MENU="`which xdg-desktop-menu 2> /dev/null`" -UPDATE_MENUS="`which update-menus 2> /dev/null`" +XDG_DESKTOP_MENU="`which xdg-desktop-menu 2> /dev/null || true`" +UPDATE_MENUS="`which update-menus 2> /dev/null || true`" if [ ! -x "$XDG_DESKTOP_MENU" ]; then echo "Error: Could not find xdg-desktop-menu" >&2 exit 1 -- cgit v1.1