Accepting request 491274 from Base:System
- Simplify patch readline-5.2-conf.patch - Do not throw info and manual pages away OBS-URL: https://build.opensuse.org/request/show/491274 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=137
This commit is contained in:
commit
97a32b7a74
10
bash.changes
10
bash.changes
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 26 16:04:15 UTC 2017 - werner@suse.de
|
||||
|
||||
- Simplify patch readline-5.2-conf.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 25 09:18:16 UTC 2017 - werner@suse.de
|
||||
|
||||
- Do not throw info and manual pages away
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 17 14:08:47 UTC 2017 - werner@suse.de
|
||||
|
||||
|
22
bash.spec
22
bash.spec
@ -610,8 +610,6 @@ EOF
|
||||
# remove unpackaged files
|
||||
rm -fv %{buildroot}%{_libdir}/libhistory.so.*
|
||||
rm -fv %{buildroot}%{_libdir}/libreadline.so.*
|
||||
rm -fv %{buildroot}%{_infodir}/rluserman.info.gz
|
||||
rm -fv %{buildroot}%{_mandir}/man3/history.3*
|
||||
rm -fv %{buildroot}%{_defaultdocdir}/readline/INSTALL
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/skel
|
||||
install -m 644 %{S:5} %{buildroot}%{_sysconfdir}/skel/.bashrc
|
||||
@ -634,10 +632,12 @@ EOF
|
||||
%post -n readline-doc
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/history.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/readline.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/rluserman.info.gz
|
||||
|
||||
%preun -n readline-doc
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/history.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/readline.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/rluserman.info.gz
|
||||
|
||||
%clean
|
||||
LD_LIBRARY_PATH=%{buildroot}/%{_lib} \
|
||||
@ -665,11 +665,11 @@ ldd -u -r %{buildroot}/%{_lib}/libreadline.so.* || true
|
||||
|
||||
%files -n bash-doc
|
||||
%defattr(-,root,root)
|
||||
%doc %{_infodir}/bash.info.gz
|
||||
%doc %{_mandir}/man1/bash.1.gz
|
||||
%doc %{_mandir}/man1/bashbuiltins.1.gz
|
||||
%doc %{_mandir}/man1/bashbug.1.gz
|
||||
%doc %{_mandir}/man1/rbash.1.gz
|
||||
%doc %{_infodir}/bash.info*
|
||||
%doc %{_mandir}/man1/bash.1*
|
||||
%doc %{_mandir}/man1/bashbuiltins.1*
|
||||
%doc %{_mandir}/man1/bashbug.1*
|
||||
%doc %{_mandir}/man1/rbash.1*
|
||||
%doc %{_defaultdocdir}/bash/
|
||||
|
||||
%if 0%suse_version >= 1020
|
||||
@ -703,12 +703,14 @@ ldd -u -r %{buildroot}/%{_lib}/libreadline.so.* || true
|
||||
%{_incdir}/readline/
|
||||
%{_libdir}/libhistory.so
|
||||
%{_libdir}/libreadline.so
|
||||
%doc %{_mandir}/man3/readline.3.gz
|
||||
|
||||
%files -n readline-doc
|
||||
%defattr(-,root,root)
|
||||
%doc %{_infodir}/history.info.gz
|
||||
%doc %{_infodir}/readline.info.gz
|
||||
%doc %{_infodir}/history.info*
|
||||
%doc %{_infodir}/readline.info*
|
||||
%doc %{_infodir}/rluserman.info*
|
||||
%doc %{_mandir}/man3/history.3*
|
||||
%doc %{_mandir}/man3/readline.3*
|
||||
%doc %{_defaultdocdir}/readline/
|
||||
|
||||
%changelog
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
lib/readline/bind.c | 49 +++++++++++++++++++++++++++++++++++++++++--------
|
||||
lib/readline/doc/rluser.texi | 3 ++-
|
||||
lib/readline/rlconf.h | 2 +-
|
||||
3 files changed, 44 insertions(+), 10 deletions(-)
|
||||
lib/readline/bind.c | 55 ++++++++++++++++++++++++++++++++++---------
|
||||
lib/readline/doc/rluser.texi | 3 +-
|
||||
lib/readline/rlconf.h | 2 -
|
||||
3 files changed, 47 insertions(+), 13 deletions(-)
|
||||
|
||||
--- lib/readline/bind.c
|
||||
+++ lib/readline/bind.c 2006-11-13 16:20:23.000000000 +0000
|
||||
+++ lib/readline/bind.c 2017-04-26 13:07:22.115249970 +0000
|
||||
@@ -826,6 +826,9 @@ rl_function_of_keyseq (keyseq, map, type
|
||||
/* The last key bindings file read. */
|
||||
static char *last_readline_init_file = (char *)NULL;
|
||||
@ -32,32 +32,29 @@
|
||||
4. /etc/inputrc
|
||||
If the file existed and could be opened and read, 0 is returned,
|
||||
otherwise errno is returned. */
|
||||
@@ -907,16 +913,37 @@ rl_read_init_file (filename)
|
||||
if (filename == 0)
|
||||
filename = last_readline_init_file;
|
||||
@@ -905,18 +911,39 @@ rl_read_init_file (filename)
|
||||
{
|
||||
/* Default the filename. */
|
||||
if (filename == 0)
|
||||
- filename = last_readline_init_file;
|
||||
- if (filename == 0)
|
||||
- filename = sh_get_env_value ("INPUTRC");
|
||||
- if (filename == 0 || *filename == 0)
|
||||
+ {
|
||||
+ filename = sh_get_env_value ("INPUTRC");
|
||||
+ if (filename && !strncmp(SYS_INPUTRC, filename, strlen(SYS_INPUTRC)))
|
||||
+ {
|
||||
+ struct stat st;
|
||||
+ char *default_inputrc = tilde_expand(DEFAULT_INPUTRC);
|
||||
+
|
||||
+ if ((stat(default_inputrc, &st) == 0))
|
||||
+ {
|
||||
+ filename = DEFAULT_INPUTRC;
|
||||
+ read_system_init_file = 1;
|
||||
+ }
|
||||
+ else
|
||||
+ read_system_init_file = 0;
|
||||
+
|
||||
+ free(default_inputrc);
|
||||
+ filename = last_readline_init_file;
|
||||
+ if (filename == 0)
|
||||
+ {
|
||||
+ filename = sh_get_env_value ("INPUTRC");
|
||||
+ read_system_init_file = 0;
|
||||
+ }
|
||||
+ if (filename == 0)
|
||||
+ {
|
||||
+ filename = DEFAULT_INPUTRC;
|
||||
+ read_system_init_file = 1;
|
||||
+ }
|
||||
+ else
|
||||
+ read_system_init_file = 1;
|
||||
+ }
|
||||
if (filename == 0 || *filename == 0)
|
||||
+
|
||||
+ if (*filename == 0)
|
||||
{
|
||||
filename = DEFAULT_INPUTRC;
|
||||
- /* Try to read DEFAULT_INPUTRC; fall back to SYS_INPUTRC on failure */
|
||||
@ -70,7 +67,15 @@
|
||||
+ sv_bell_style(sh_get_env_value("DEFAULT_BELL_STYLE"));
|
||||
+
|
||||
+ if (read_system_init_file)
|
||||
+ _rl_read_init_file (SYS_INPUTRC, 1);
|
||||
+ if (filename == last_readline_init_file)
|
||||
+ {
|
||||
+ filename = savestring (filename);
|
||||
+ _rl_read_init_file (SYS_INPUTRC, 0);
|
||||
+ free (last_readline_init_file);
|
||||
+ last_readline_init_file = filename;
|
||||
+ }
|
||||
+ else
|
||||
+ _rl_read_init_file (SYS_INPUTRC, 0);
|
||||
+
|
||||
#if defined (__MSDOS__)
|
||||
if (_rl_read_init_file (filename, 0) == 0)
|
||||
@ -99,19 +104,8 @@
|
||||
static int sv_combegin PARAMS((const char *));
|
||||
static int sv_dispprefix PARAMS((const char *));
|
||||
static int sv_compquery PARAMS((const char *));
|
||||
--- lib/readline/rlconf.h
|
||||
+++ lib/readline/rlconf.h 2006-11-13 16:21:26.000000000 +0000
|
||||
@@ -37,7 +37,7 @@
|
||||
#define HANDLE_SIGNALS
|
||||
|
||||
/* Ugly but working hack for binding prefix meta. */
|
||||
-#define PREFIX_META_HACK
|
||||
+#undef PREFIX_META_HACK
|
||||
|
||||
/* The next-to-last-ditch effort file name for a user-specific init file. */
|
||||
#define DEFAULT_INPUTRC "~/.inputrc"
|
||||
--- lib/readline/doc/rluser.texi
|
||||
+++ lib/readline/doc/rluser.texi 2006-11-13 16:23:56.000000000 +0000
|
||||
+++ lib/readline/doc/rluser.texi 2017-04-26 12:57:24.590906421 +0000
|
||||
@@ -349,7 +349,8 @@ file is taken from the value of the envi
|
||||
@end ifclear
|
||||
that variable is unset, the default is @file{~/.inputrc}. If that
|
||||
@ -122,3 +116,14 @@
|
||||
|
||||
When a program which uses the Readline library starts up, the
|
||||
init file is read, and the key bindings are set.
|
||||
--- lib/readline/rlconf.h
|
||||
+++ lib/readline/rlconf.h 2017-04-26 12:57:24.586906499 +0000
|
||||
@@ -37,7 +37,7 @@
|
||||
#define HANDLE_SIGNALS
|
||||
|
||||
/* Ugly but working hack for binding prefix meta. */
|
||||
-#define PREFIX_META_HACK
|
||||
+#undef PREFIX_META_HACK
|
||||
|
||||
/* The next-to-last-ditch effort file name for a user-specific init file. */
|
||||
#define DEFAULT_INPUTRC "~/.inputrc"
|
||||
|
Loading…
Reference in New Issue
Block a user