diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-03 20:10:21 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-03 20:10:21 +0000 |
commit | 5fad4e034b611f794326eb6298516ba5dc1631b4 (patch) | |
tree | 664f085cf072fdcc40bb33b49957c1b7dac84ea5 /chrome/installer/linux/common | |
parent | 011793f0763df74cb9adc41f6ee27372a0d91848 (diff) | |
download | chromium_src-5fad4e034b611f794326eb6298516ba5dc1631b4.zip chromium_src-5fad4e034b611f794326eb6298516ba5dc1631b4.tar.gz chromium_src-5fad4e034b611f794326eb6298516ba5dc1631b4.tar.bz2 |
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
Diffstat (limited to 'chrome/installer/linux/common')
-rw-r--r-- | chrome/installer/linux/common/postinst.include | 6 | ||||
-rw-r--r-- | chrome/installer/linux/common/prerm.include | 6 |
2 files changed, 6 insertions, 6 deletions
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 |