- related: #693458
updated patch for .so links because previous one wasn't working very well
This commit is contained in:
parent
4a5c3e876c
commit
44d2b4d484
@ -1,16 +1,63 @@
|
||||
diff -up man-db-2.6.1/src/ult_src.c.better_so man-db-2.6.1/src/ult_src.c
|
||||
--- man-db-2.6.1/src/ult_src.c.better_so 2012-02-05 14:21:24.000000000 +0100
|
||||
+++ man-db-2.6.1/src/ult_src.c 2012-04-24 13:55:03.770469147 +0200
|
||||
@@ -345,6 +345,12 @@ const char *ult_src (const char *name, c
|
||||
diff -upr man-db-2.6.1.orig/src/Makefile.am man-db-2.6.1/src/Makefile.am
|
||||
--- man-db-2.6.1.orig/src/Makefile.am 2012-04-24 18:47:20.023383735 +0200
|
||||
+++ man-db-2.6.1/src/Makefile.am 2012-04-24 18:54:41.219294370 +0200
|
||||
@@ -87,6 +87,8 @@ lexgrog_SOURCES = \
|
||||
descriptions.h \
|
||||
filenames.c \
|
||||
filenames.h \
|
||||
+ globbing.c \
|
||||
+ globbing.h \
|
||||
lexgrog.l \
|
||||
lexgrog_test.c \
|
||||
manconv.c \
|
||||
diff -upr man-db-2.6.1.orig/src/ult_src.c man-db-2.6.1/src/ult_src.c
|
||||
--- man-db-2.6.1.orig/src/ult_src.c 2012-02-05 14:21:24.000000000 +0100
|
||||
+++ man-db-2.6.1/src/ult_src.c 2012-04-24 19:13:20.499950083 +0200
|
||||
@@ -59,6 +59,8 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "canonicalize.h"
|
||||
+#include "dirname.h"
|
||||
+#include "globbing.h"
|
||||
|
||||
#include "gettext.h"
|
||||
#define _(String) gettext (String)
|
||||
@@ -343,6 +345,38 @@ const char *ult_src (const char *name, c
|
||||
free (base);
|
||||
base = appendstr (NULL, path, "/", include,
|
||||
NULL);
|
||||
+
|
||||
+ /* If the original path from above doesn't exist, try to create
|
||||
+ * new path as if the "include" was relative to the current
|
||||
+ * man page.
|
||||
+ */
|
||||
+ if (access (base, F_OK) != 0) {
|
||||
+ char *dirname = mdir_name (name);
|
||||
+ char *tempFile = appendstr (NULL, dirname, "/", include,
|
||||
+ NULL);
|
||||
+ free (dirname);
|
||||
+ if (access (tempFile, F_OK) == 0) {
|
||||
+ free (base);
|
||||
+ base = canonicalize_filename_mode (tempFile,
|
||||
+ CAN_EXISTING);
|
||||
+ } else {
|
||||
+ char *tempFileAsterisk = appendstr (NULL, tempFile,
|
||||
+ "*", NULL);
|
||||
+ char **possibleFiles = expand_path (tempFileAsterisk);
|
||||
+ free (tempFileAsterisk);
|
||||
+ if (access (possibleFiles[0], F_OK) == 0) {
|
||||
+ free (base);
|
||||
+ base = canonicalize_filename_mode (possibleFiles[0],
|
||||
+ CAN_EXISTING);
|
||||
+ }
|
||||
+ int i;
|
||||
+ for (i = 0; possibleFiles[i] != NULL; i++) {
|
||||
+ free (possibleFiles[i]);
|
||||
+ }
|
||||
+ free (possibleFiles);
|
||||
+ }
|
||||
+ free (tempFile);
|
||||
+ }
|
||||
free (include);
|
||||
|
||||
+ if (access (base, F_OK) != 0) {
|
||||
+ debug ("ult_src: original path of .so link: %s doesn't exist\n",
|
||||
+ base);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
debug ("ult_src: points to %s\n", base);
|
||||
|
||||
recurse++;
|
||||
|
@ -3,7 +3,7 @@
|
||||
Summary: Tools for searching and reading man pages
|
||||
Name: man-db
|
||||
Version: 2.6.1
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
# project man-db GPLv2+
|
||||
# Gnulib part GPLv3+
|
||||
License: GPLv2+ and GPLv3+
|
||||
@ -116,6 +116,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%lang(it) %{_datadir}/man/it/man*/*
|
||||
|
||||
%changelog
|
||||
* Tue Apr 24 2012 Peter Schiffer <pschiffe@redhat.com> - 2.6.1-4
|
||||
- related: #693458
|
||||
updated patch for .so links because previous one wasn't working very well
|
||||
|
||||
* Tue Apr 24 2012 Peter Schiffer <pschiffe@redhat.com> - 2.6.1-3
|
||||
- added autoconf, automake, libtool and gettext-devel to the build requires
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user