SHA256
1
0
forked from pool/man
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
# in revision control.
--- 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)
AC_CANONICAL_HOST
AC_ARG_PROGRAM
@ -200,7 +200,7 @@
#endif /* HAVE_COMPRESS */
--- 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 @@
#undef MAN_DB_CREATES
@ -471,7 +471,7 @@
$(INSTALL_PROGRAM) catman $(DESTDIR)$(bindir)/$(catman)
$(INSTALL_PROGRAM) whatis $(DESTDIR)$(bindir)/$(whatis)
--- 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[])
char *catpath;
size_t len;
@ -795,7 +795,7 @@
if (p_lg->type)
BEGIN (CAT_FILE);
--- 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;
#include <utime.h>
#include <sys/types.h>
@ -885,13 +885,17 @@
/* allocate space for the program name */
*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);
else {
struct stat st;
+ char *pwd = cwd;
+ 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)) {
+ char *dlm;
+ pwd = strdupa(argv);
@ -899,11 +903,7 @@
+ if ((dlm = strrchr(pwd, '/')))
+ *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]) {
+ debug ("chdir %s\n", pwd);
+ if (chdir (pwd)) {
@ -937,11 +937,13 @@
if (exit_status == OK) {
char *argv_copy = xstrdup (argv);
lang = lang_dir (argv);
- if (!display (NULL, argv, NULL, basename (argv_copy),
+ if (!lang || !*lang)
+ lang = internal_locale;
if (!display (NULL, argv, NULL, basename (argv_copy),
+ if (!display (NULL, file, NULL, basename (argv_copy),
NULL)) {
if (local_mf)
error (0, errno, "%s", argv);
@@ -668,12 +671,6 @@ static int local_man_loop (const char *a
return exit_status;
}
@ -1524,7 +1526,7 @@
# Flags.
# NOCACHE keeps man from creating cat pages.
--- 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;
#ifdef SECURE_MAN_UID
extern uid_t ruid;
@ -1578,7 +1580,7 @@
--- 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 @@
# include <strings.h>
#else /* no string(s) header */
@ -1789,7 +1791,7 @@
}
--- 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();
#include <sys/types.h>
@ -1906,7 +1908,7 @@
#include "libdb/mydbm.h" /* for full definition of MAN_DB */
#include "lib/pipeline.h"
--- 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)
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

View File

@ -10,6 +10,7 @@
# norootforbuild
Name: man
BuildRequires: flex groff
%if %suse_version > 1020
@ -23,7 +24,7 @@ BuildRequires: gettext-runtime gettext-tools
BuildRequires: gettext gettext-devel
%endif
Version: 2.5.0
Release: 14
Release: 22
Summary: A Program for Displaying man Pages
License: GPL v2 or later
Group: System/Base
@ -239,6 +240,8 @@ test -d var/catman/ && rm -rf var/catman/ || true
%{_localstatedir}/adm/fillup-templates/sysconfig.cron-man
%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
- Make mandb cron job ionice bnc#356792
- Avoid assert on wrong locale man path