summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-07 01:44:00 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-07 01:44:00 +0000
commit9abb7c2a4fa3adf6fa0043dfaa2da462f37a74ad (patch)
treeb480481e655f52730c9ca6bcd2c15dd09437fbf3 /sys-apps/man/files
parenttouchups (diff)
downloadgentoo-2-9abb7c2a4fa3adf6fa0043dfaa2da462f37a74ad.tar.gz
gentoo-2-9abb7c2a4fa3adf6fa0043dfaa2da462f37a74ad.tar.bz2
gentoo-2-9abb7c2a4fa3adf6fa0043dfaa2da462f37a74ad.zip
Version bump and fix duplicate man issue #90186 by Stuart W. Finlayson.
(Portage version: 2.1_pre4-r1)
Diffstat (limited to 'sys-apps/man/files')
-rw-r--r--sys-apps/man/files/digest-man-1.6c3
-rw-r--r--sys-apps/man/files/man-1.6c-cut-duplicate-manpaths.patch83
-rw-r--r--sys-apps/man/files/man-1.6c-makewhatis-typo.patch13
3 files changed, 99 insertions, 0 deletions
diff --git a/sys-apps/man/files/digest-man-1.6c b/sys-apps/man/files/digest-man-1.6c
new file mode 100644
index 000000000000..59bee2563827
--- /dev/null
+++ b/sys-apps/man/files/digest-man-1.6c
@@ -0,0 +1,3 @@
+MD5 ac1e7d60dfedb7d1c6f398ae5b038996 man-1.6c.tar.gz 245178
+RMD160 1894ed00284ad522a80b256f20b85bdb058af48f man-1.6c.tar.gz 245178
+SHA256 ad5f5e0b6e1cb1e223b5a8dcbac1826c6cfa710d1e858c46a0b60a99e23d2842 man-1.6c.tar.gz 245178
diff --git a/sys-apps/man/files/man-1.6c-cut-duplicate-manpaths.patch b/sys-apps/man/files/man-1.6c-cut-duplicate-manpaths.patch
new file mode 100644
index 000000000000..9ecaeb70e16e
--- /dev/null
+++ b/sys-apps/man/files/man-1.6c-cut-duplicate-manpaths.patch
@@ -0,0 +1,83 @@
+http://bugs.gentoo.org/90186
+
+If we have entries in MANPATH that are really symlinks to other entries,
+then many man functions will yield duplicate entries.
+
+Without this patch, we see this behavior:
+$ echo $MANPATH
+/usr/share/man:/usr/man
+$ man --path
+/usr/share/man:/usr/man
+$ ls -ld /usr/share/man /usr/man
+lrwxrwxrwx 1 /usr/man -> /usr/share/man
+drwxr-xr-x 36 /usr/share/man
+$ man -k passwd
+passwd (1) - change user password
+passwd (1) - change user password
+
+With this patch, we get:
+$ echo $MANPATH
+/usr/share/man:/usr/man
+$ man --path
+/usr/share/man
+$ ls -ld /usr/share/man /usr/man
+lrwxrwxrwx 1 /usr/man -> /usr/share/man
+drwxr-xr-x 36 /usr/share/man
+$ man -k passwd
+passwd (1) - change user password
+
+--- man-1.6c/src/manpath.c
++++ man-1.6c/src/manpath.c
+@@ -380,6 +380,44 @@
+ }
+ }
+
++void trim_symlinked_manpaths (void);
++void
++trim_symlinked_manpaths () {
++ /*
++ * Skip symlinks to other entries in path.
++ * Do this after we've built the entire list.
++ */
++ struct stat *stat_cache;
++ size_t i, j, size;
++
++ if (!mandirlist)
++ return;
++
++ for (size = 0; mandirlist[size]; ++size)
++ /* count # of elements */;
++ if (size == 0)
++ return;
++ /* cache stat information for every element */
++ stat_cache = (struct stat *) my_malloc (size * sizeof(*stat_cache));
++ for (i = 0; i < size; ++i)
++ stat(mandirlist[i], &stat_cache[i]);
++
++#define EQU_STAT(s,d) ((s).st_dev == (d).st_dev && (s).st_ino == (d).st_ino)
++ for (i = 0; i < size; ++i) {
++ for (j = i+1; j < size; ++j) {
++ if (EQU_STAT(stat_cache[i], stat_cache[j])) {
++ /* these two entries are the same, so cut out the second one */
++ memmove(mandirlist+j, mandirlist+j+1, (size-j)*sizeof(*mandirlist));
++ memmove(stat_cache+j, stat_cache+j+1, (size-j)*sizeof(*stat_cache));
++ mandirlist[--size] = NULL;
++ --j;
++ }
++ }
++ }
++
++ free(stat_cache);
++}
++
+ void
+ init_manpath () {
+ static int done = 0;
+@@ -391,6 +431,7 @@
+ (manp = getenv ("MANPATH")) == NULL)
+ manp = ""; /* default path */
+ split (manp, to_mandirlist, 0);
++ trim_symlinked_manpaths ();
+ done = 1;
+ }
+ }
diff --git a/sys-apps/man/files/man-1.6c-makewhatis-typo.patch b/sys-apps/man/files/man-1.6c-makewhatis-typo.patch
new file mode 100644
index 000000000000..ccaa05db3eab
--- /dev/null
+++ b/sys-apps/man/files/man-1.6c-makewhatis-typo.patch
@@ -0,0 +1,13 @@
+One two many ) in if expression ...
+
+--- src/makewhatis.sh
++++ src/makewhatis.sh
+@@ -266,7 +266,7 @@
+ $2 ~ /^N[ÉE]V/ || $2 ~ /^NAMA/ || $2 ~ /^̾Á°/ ||
+ $2 ~ /^̾¾Î/ || $2 ~ /^À̸§/ || $2 ~ /^NAZWA/ ||
+ $2 ~ /^îáú÷áîéå/ || $2 ~ /^Ãû³Æ/ || $2 ~ /^¦WºÙ/ ||
+- $2 ~ /^NOME/ || $2 ~ /^NAAM/) || $2 ~ /^ÈÌÅ/)) ||
++ $2 ~ /^NOME/ || $2 ~ /^NAAM/ || $2 ~ /^ÈÌÅ/)) ||
+ (pages == "cat" && $1 ~ /^NAME/)) {
+ if (!insh) {
+ insh = 1;