backport upstream patch
This commit is contained in:
Ivana Hutarova Varekova 2011-03-23 15:16:15 +01:00
parent 8099187202
commit f73d977692
2 changed files with 32 additions and 1 deletions

25
man-db-2.5.9-sec.patch Normal file
View File

@ -0,0 +1,25 @@
diff -up man-db-2.5.9/src/man.c.pom man-db-2.5.9/src/man.c
--- man-db-2.5.9/src/man.c.pom 2010-11-17 12:31:24.000000000 +0100
+++ man-db-2.5.9/src/man.c 2011-03-23 12:11:46.000000000 +0100
@@ -2827,6 +2827,21 @@ static int compare_candidates (const str
* moved out of order with respect to their parent sections.
*/
if (strcmp (lsource->ext, rsource->ext)) {
+ const char **sp;
+
+ /* If the user asked for an explicit section, sort exact
+ * matches first.
+ */
+ if (section) {
+ if (STREQ (lsource->ext, section)) {
+ if (!STREQ (rsource->ext, section))
+ return -1;
+ } else {
+ if (STREQ (rsource->ext, section))
+ return 1;
+ }
+ }
+
/* Find out whether lsource->ext is ahead of rsource->ext in
* section_list.
*/

View File

@ -3,7 +3,7 @@
Summary: Tools for searching and reading man pages
Name: man-db
Version: 2.5.9
Release: 4%{?dist}
Release: 5%{?dist}
# project man-db GPLv2+
# Gnulib part GPLv3+
License: GPLv2+ and GPLv3+
@ -15,6 +15,7 @@ Source2: man-db.sysconfig
Patch0: man-db-2.5.9-config.patch
# Resolves: #655385 - use old format of nroff output
Patch1: man-db-2.5.9-sgr.patch
Patch2: man-db-2.5.9-sec.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Obsoletes: man < 2.0
Provides: man-pages-reader = %{version}
@ -35,6 +36,7 @@ manual pages.
%setup -q
%patch0 -p1 -b .conf
%patch1 -p1 -b .sgr
%patch2 -p1 -b .sec
%build
%configure\
@ -116,6 +118,10 @@ rm -rf $RPM_BUILD_ROOT
%lang(ja) %{_datadir}/man/ja/man*/*
%changelog
* Wed Mar 23 2011 Ivana Hutarova Varekova <varekova@redhat.com> - 2.5.9-5
* Resolves: #684977
backport upstream patch
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild