OBS User unknown 2008-02-28 01:01:41 +00:00 committed by Git OBS Bridge
parent 5d097a38b0
commit 133dedf978
3 changed files with 27 additions and 17 deletions

View File

@ -52,7 +52,7 @@
# This is not done automatically, since the .po files are stored # This is not done automatically, since the .po files are stored
# in revision control. # in revision control.
--- configure.ac --- configure.ac
+++ configure.ac 2008-01-29 19:07:22.794596510 +0100 +++ configure.ac 2008-01-29 19:07:22.794596000 +0100
@@ -10,17 +10,30 @@ AC_CONFIG_HEADER(config.h) @@ -10,17 +10,30 @@ AC_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST AC_CANONICAL_HOST
AC_ARG_PROGRAM AC_ARG_PROGRAM
@ -200,7 +200,7 @@
#endif /* HAVE_COMPRESS */ #endif /* HAVE_COMPRESS */
--- include/manconfig.h.in --- include/manconfig.h.in
+++ include/manconfig.h.in 2008-01-30 11:56:48.181631087 +0100 +++ include/manconfig.h.in 2008-01-30 11:56:48.181631000 +0100
@@ -73,7 +73,7 @@ @@ -73,7 +73,7 @@
#undef MAN_DB_CREATES #undef MAN_DB_CREATES
@ -471,7 +471,7 @@
$(INSTALL_PROGRAM) catman $(DESTDIR)$(bindir)/$(catman) $(INSTALL_PROGRAM) catman $(DESTDIR)$(bindir)/$(catman)
$(INSTALL_PROGRAM) whatis $(DESTDIR)$(bindir)/$(whatis) $(INSTALL_PROGRAM) whatis $(DESTDIR)$(bindir)/$(whatis)
--- src/catman.c --- src/catman.c
+++ src/catman.c 2008-01-30 12:02:20.699895492 +0100 +++ src/catman.c 2008-01-30 12:02:20.699895000 +0100
@@ -494,7 +494,7 @@ int main (int argc, char *argv[]) @@ -494,7 +494,7 @@ int main (int argc, char *argv[])
char *catpath; char *catpath;
size_t len; size_t len;
@ -795,7 +795,7 @@
if (p_lg->type) if (p_lg->type)
BEGIN (CAT_FILE); BEGIN (CAT_FILE);
--- src/man.c --- src/man.c
+++ src/man.c 2008-01-30 11:59:52.020999180 +0100 +++ src/man.c 2008-02-26 13:05:42.254465287 +0100
@@ -98,6 +98,7 @@ static char *cwd; @@ -98,6 +98,7 @@ static char *cwd;
#include <utime.h> #include <utime.h>
#include <sys/types.h> #include <sys/types.h>
@ -885,13 +885,17 @@
/* allocate space for the program name */ /* allocate space for the program name */
*argc = 0; *argc = 0;
@@ -624,36 +612,51 @@ static int local_man_loop (const char *a @@ -624,37 +612,52 @@ static int local_man_loop (const char *a
display (NULL, "", NULL, "(stdin)", NULL); display (NULL, "", NULL, "(stdin)", NULL);
else { else {
struct stat st; struct stat st;
+ char *pwd = cwd; + char *pwd = cwd;
+ char *file = basename((char*)argv); + char *file = basename((char*)argv);
+
- if (cwd[0]) {
- debug ("chdir %s\n", cwd);
- if (chdir (cwd)) {
- error (0, errno, _("can't chdir to %s"), cwd);
+ if (strcmp(argv, file)) { + if (strcmp(argv, file)) {
+ char *dlm; + char *dlm;
+ pwd = strdupa(argv); + pwd = strdupa(argv);
@ -899,11 +903,7 @@
+ if ((dlm = strrchr(pwd, '/'))) + if ((dlm = strrchr(pwd, '/')))
+ *dlm = '\0'; + *dlm = '\0';
+ } + }
+
- if (cwd[0]) {
- debug ("chdir %s\n", cwd);
- if (chdir (cwd)) {
- error (0, errno, _("can't chdir to %s"), cwd);
+ if (pwd[0]) { + if (pwd[0]) {
+ debug ("chdir %s\n", pwd); + debug ("chdir %s\n", pwd);
+ if (chdir (pwd)) { + if (chdir (pwd)) {
@ -937,11 +937,13 @@
if (exit_status == OK) { if (exit_status == OK) {
char *argv_copy = xstrdup (argv); char *argv_copy = xstrdup (argv);
lang = lang_dir (argv); lang = lang_dir (argv);
- if (!display (NULL, argv, NULL, basename (argv_copy),
+ if (!lang || !*lang) + if (!lang || !*lang)
+ lang = internal_locale; + lang = internal_locale;
if (!display (NULL, argv, NULL, basename (argv_copy), + if (!display (NULL, file, NULL, basename (argv_copy),
NULL)) { NULL)) {
if (local_mf) if (local_mf)
error (0, errno, "%s", argv);
@@ -668,12 +671,6 @@ static int local_man_loop (const char *a @@ -668,12 +671,6 @@ static int local_man_loop (const char *a
return exit_status; return exit_status;
} }
@ -1524,7 +1526,7 @@
# Flags. # Flags.
# NOCACHE keeps man from creating cat pages. # NOCACHE keeps man from creating cat pages.
--- src/mandb.c --- src/mandb.c
+++ src/mandb.c 2008-01-30 12:01:40.242753517 +0100 +++ src/mandb.c 2008-01-30 12:01:40.242753000 +0100
@@ -143,6 +143,8 @@ static const char *xtmpfile; @@ -143,6 +143,8 @@ static const char *xtmpfile;
#ifdef SECURE_MAN_UID #ifdef SECURE_MAN_UID
extern uid_t ruid; extern uid_t ruid;
@ -1578,7 +1580,7 @@
--- src/manp.c --- src/manp.c
+++ src/manp.c 2008-01-30 12:01:02.982017854 +0100 +++ src/manp.c 2008-01-30 12:01:02.982017000 +0100
@@ -63,6 +63,7 @@ @@ -63,6 +63,7 @@
# include <strings.h> # include <strings.h>
#else /* no string(s) header */ #else /* no string(s) header */
@ -1789,7 +1791,7 @@
} }
--- src/straycats.c --- src/straycats.c
+++ src/straycats.c 2008-01-30 11:57:57.562451820 +0100 +++ src/straycats.c 2008-01-30 11:57:57.562451000 +0100
@@ -48,6 +48,7 @@ extern char *strrchr(); @@ -48,6 +48,7 @@ extern char *strrchr();
#include <sys/types.h> #include <sys/types.h>
@ -1906,7 +1908,7 @@
#include "libdb/mydbm.h" /* for full definition of MAN_DB */ #include "libdb/mydbm.h" /* for full definition of MAN_DB */
#include "lib/pipeline.h" #include "lib/pipeline.h"
--- src/whatis.c --- src/whatis.c
+++ src/whatis.c 2008-01-30 12:01:59.721229159 +0100 +++ src/whatis.c 2008-01-30 12:01:59.721229000 +0100
@@ -687,7 +687,7 @@ static int search (char *page) @@ -687,7 +687,7 @@ static int search (char *page)
debug ("lower(%s) = \"%s\"\n", page, lowpage); debug ("lower(%s) = \"%s\"\n", page, lowpage);

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Feb 26 13:10:39 CET 2008 - werner@suse.de
- Ensure to find local manual pages even in sub directories
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jan 30 12:09:07 CET 2008 - werner@suse.de Wed Jan 30 12:09:07 CET 2008 - werner@suse.de

View File

@ -10,6 +10,7 @@
# norootforbuild # norootforbuild
Name: man Name: man
BuildRequires: flex groff BuildRequires: flex groff
%if %suse_version > 1020 %if %suse_version > 1020
@ -23,7 +24,7 @@ BuildRequires: gettext-runtime gettext-tools
BuildRequires: gettext gettext-devel BuildRequires: gettext gettext-devel
%endif %endif
Version: 2.5.0 Version: 2.5.0
Release: 14 Release: 22
Summary: A Program for Displaying man Pages Summary: A Program for Displaying man Pages
License: GPL v2 or later License: GPL v2 or later
Group: System/Base Group: System/Base
@ -239,6 +240,8 @@ test -d var/catman/ && rm -rf var/catman/ || true
%{_localstatedir}/adm/fillup-templates/sysconfig.cron-man %{_localstatedir}/adm/fillup-templates/sysconfig.cron-man
%changelog %changelog
* Tue Feb 26 2008 werner@suse.de
- Ensure to find local manual pages even in sub directories
* Wed Jan 30 2008 werner@suse.de * Wed Jan 30 2008 werner@suse.de
- Make mandb cron job ionice bnc#356792 - Make mandb cron job ionice bnc#356792
- Avoid assert on wrong locale man path - Avoid assert on wrong locale man path