remove unnecessary files

This commit is contained in:
openeuler-basic 2020-01-08 16:24:19 +08:00
parent 36c3f93f98
commit e2702e3d9d
4 changed files with 7 additions and 44 deletions

View File

@ -1,27 +0,0 @@
diff -up which-2.21/tilde/tilde.c.me which-2.21/tilde/tilde.c
--- which-2.21/tilde/tilde.c.me 2018-07-23 14:32:47.002225732 +0200
+++ which-2.21/tilde/tilde.c 2018-07-23 14:49:06.363623898 +0200
@@ -196,7 +196,8 @@ tilde_expand (string)
int result_size, result_index;
result_index = result_size = 0;
- if (result = strchr (string, '~'))
+ result = strchr (string, '~');
+ if (result)
result = (char *)xmalloc (result_size = (strlen (string) + 16));
else
result = (char *)xmalloc (result_size = (strlen (string) + 1));
diff -up which-2.21/which.c.me which-2.21/which.c
diff -up which-2.21/which.c.me which-2.21/which.c
--- which-2.21/which.c.me 2018-07-23 15:09:04.355222509 +0200
+++ which-2.21/which.c 2018-07-25 14:57:43.696309701 +0200
@@ -671,6 +671,9 @@ int main(int argc, char *argv[])
}
}
+ if (abs_path)
+ free(abs_path);
+
return fail_count;
}

View File

@ -1,13 +1,10 @@
Name: which
Version: 2.21
Release: 13
Release: 14
Summary: Show the full path of commands
License: GPLv3
URL: https://savannah.gnu.org/projects/which/
Source0: http://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz
Source1: which2.sh
Source2: which2.csh
Patch0: which-2.21-coverity-fixes.patch
BuildRequires: gcc git
@ -31,13 +28,10 @@ Contains documents and manuals files for which
%install
%make_install
mkdir -p %{buildroot}/%{_sysconfdir}/profile.d
install -p -m 0644 %{SOURCE1} %{SOURCE2} %{buildroot}/%{_sysconfdir}/profile.d
rm -f %{buildroot}/%{_datadir}/info/dir
%files
%license COPYING AUTHORS
%{_sysconfdir}/profile.d/%{name}*
%{_bindir}/%{name}
%files help
@ -46,6 +40,12 @@ rm -f %{buildroot}/%{_datadir}/info/dir
%{_datadir}/info/%{name}.info.gz
%changelog
* Wed Jan 8 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.21-14
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: remove unnecessary files
* Wed Oct 10 2019 luhuaxin <luhuaxin@huawei.com> - 2.21-13
- Type: enhancement
- ID: NA

View File

@ -1,3 +0,0 @@
# Initialization script for csh
# alias which 'alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'

View File

@ -1,7 +0,0 @@
# Initialization script for bash and sh
if [ "$0" = ksh ] ; then
alias which='(alias; typeset -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
else
alias which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
fi