rpms/man/devel man-1.6f-diff.patch,NONE,1.1 man.spec,1.84,1.85

Ivana Varekova varekova at fedoraproject.org
Tue Dec 1 09:37:43 UTC 2009


Author: varekova

Update of /cvs/pkgs/rpms/man/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2765

Modified Files:
	man.spec 
Added Files:
	man-1.6f-diff.patch 
Log Message:
- fix the problem: #542852 -  'man cut cut' throws an error


man-1.6f-diff.patch:
 different.c |   35 +++++++++++++++++++++++++++++++++++
 different.h |    3 +++
 man.c       |    5 +++++
 3 files changed, 43 insertions(+)

--- NEW FILE man-1.6f-diff.patch ---
diff -up man-1.6f/src/different.c.orig man-1.6f/src/different.c
--- man-1.6f/src/different.c.orig	2009-12-01 09:48:00.000000000 +0100
+++ man-1.6f/src/different.c	2009-12-01 09:53:28.000000000 +0100
@@ -35,6 +35,41 @@ is_different(const char *file, struct fi
     return 1;
 }
 
+int free_cat_filelist(void) {
+    struct filelist *acct, *next;
+
+    acct = &cat_list;
+    while (acct->next != NULL) {
+	next = acct->next;
+	if (acct != &cat_list)
+	    free(acct);
+	acct = next;
+    }
+
+    if (acct != &cat_list)
+	free(acct);
+    cat_list.next = NULL;
+
+    return 0;
+}
+
+int free_man_filelist(void) {
+    struct filelist *acct, *next;
+
+    acct = &man_list;
+    while (acct->next != NULL) {
+	next = acct->next;
+	if (acct != &man_list)
+	    free(acct);
+	acct = next;
+    }
+    if (acct != &man_list)
+	free(acct);
+    man_list.next = NULL;
+
+    return 0;
+}
+
 int
 different_cat_file (const char *file) {
     return is_different (file, &cat_list);
diff -up man-1.6f/src/different.h.orig man-1.6f/src/different.h
--- man-1.6f/src/different.h.orig	2009-12-01 09:48:00.000000000 +0100
+++ man-1.6f/src/different.h	2009-12-01 09:42:59.000000000 +0100
@@ -1,2 +1,5 @@
 int different_cat_file (const char *file);
 int different_man_file (const char *file);
+int free_cat_filelist(void);
+int free_man_filelist(void);
+
diff -up man-1.6f/src/man.c.orig man-1.6f/src/man.c
--- man-1.6f/src/man.c.orig	2009-12-01 09:48:00.000000000 +0100
+++ man-1.6f/src/man.c	2009-12-01 09:56:33.000000000 +0100
@@ -1410,6 +1410,11 @@ main (int argc, char **argv) {
 			 gripe (NO_SUCH_ENTRY, nextarg);
 	       }
 	  }
+	/* it is necessary to free the lists of found man pages
+	   #542852 - 'man cut cut' throws an error */
+	free_cat_filelist();
+	free_man_filelist();
+
      }
      return status ? EXIT_SUCCESS : EXIT_FAILURE;
 }


Index: man.spec
===================================================================
RCS file: /cvs/pkgs/rpms/man/devel/man.spec,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -p -r1.84 -r1.85
--- man.spec	12 Oct 2009 08:10:04 -0000	1.84
+++ man.spec	1 Dec 2009 09:37:43 -0000	1.85
@@ -4,7 +4,7 @@
 Summary: A set of documentation tools: man, apropos and whatis
 Name: man
 Version: 1.6f
-Release: 23%{?dist}
+Release: 24%{?dist}
 
 License: GPLv2
 Group: System Environment/Base
@@ -40,6 +40,8 @@ Patch36: man-1.6f-makewhatis_update.patc
 Patch37: man-1.6f-makewhatis_perf.patch
 Patch38: man-1.6f-makewhatis_use.patch
 Patch39: man-1.6f-man2html-suffixes.patch
+# 542852 -  'man cut cut' throws an error
+Patch40: man-1.6f-diff.patch
 
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: coreutils
@@ -86,6 +88,7 @@ primary way to find documentation on a L
 %patch37 -p1 -b .perf
 %patch38 -p1 -b .use
 %patch39 -p1 -b .suff
+%patch40 -p1 -b .diff
 
 cp -f %{SOURCE3} msgs   # replace bad ru trans
 cp -f %{SOURCE5} ./
@@ -269,6 +272,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Dec  1 2009 Ivana Varekova <varekova at redhat.com> - 1.6f-24
+- fix the problem: #542852 -  'man cut cut' throws an error
+
 * Mon Oct 12 2009 Ivana Varekova <varekova at redhat.com> - 1.6f-23
 - fix man2html to enable to use longer suffixes (#526112)
 




More information about the fedora-extras-commits mailing list