From 80f0d549977016ad4c27267e0a72679dfee4b856258e6e54652b21ed2a1ed711 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 15 Dec 2016 09:39:43 +0000 Subject: [PATCH] mount/umount check without suse_version OBS-URL: https://build.opensuse.org/package/show/shells/bash-completion?expand=0&rev=82 --- bash-completion.changes | 6 ++++++ bash-completion.spec | 15 +++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/bash-completion.changes b/bash-completion.changes index 846ed98..a6b0aa9 100644 --- a/bash-completion.changes +++ b/bash-completion.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Dec 15 09:37:52 UTC 2016 - werner@suse.de + +- Detect if the completions for mount/umount have to be removed + for modern util-linux package but without using suse_version + ------------------------------------------------------------------- Thu Dec 15 07:49:36 UTC 2016 - werner@suse.de diff --git a/bash-completion.spec b/bash-completion.spec index 685537c..56c294f 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -59,6 +59,7 @@ BuildRequires: libxslt-tools BuildRequires: pkg-config %if %build_core BuildRequires: cmake +BuildRequires: util-linux Requires: bash %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -132,16 +133,18 @@ rm -vf %{buildroot}%{_datadir}/bash-completion/completions/hexdump rm -vf %{buildroot}%{_datadir}/bash-completion/completions/hwclock rm -vf %{buildroot}%{_datadir}/bash-completion/completions/ionice rm -vf %{buildroot}%{_datadir}/bash-completion/completions/look -%if 0%{?suse_version} <= 1320 -rm -vf %{buildroot}%{_datadir}/bash-completion/completions/mount -%endif +if test -e %{_datadir}/bash-completion/completions/mount +then + rm -vf %{buildroot}%{_datadir}/bash-completion/completions/mount +fi rm -vf %{buildroot}%{_datadir}/bash-completion/completions/newgrp rm -vf %{buildroot}%{_datadir}/bash-completion/completions/renice rm -vf %{buildroot}%{_datadir}/bash-completion/completions/rtcwake rm -vf %{buildroot}%{_datadir}/bash-completion/completions/su -%if 0%{?suse_version} <= 1320 -rm -vf %{buildroot}%{_datadir}/bash-completion/completions/umount -%endif +if test -e %{_datadir}/bash-completion/completions/umount +then + rm -vf %{buildroot}%{_datadir}/bash-completion/completions/umount +fi %endif %build_core %if %build_doc pushd doc