Hello community,
here is the log from the commit of package diffutils
checked in at Fri Aug 11 15:46:12 CEST 2006.
--------
--- diffutils/diffutils.changes 2006-07-24 18:05:30.000000000 +0200
+++ diffutils/diffutils.changes 2006-08-11 15:16:29.000000000 +0200
@@ -1,0 +2,5 @@
+Fri Aug 11 15:15:50 CEST 2006 - schwab@suse.de
+
+- Update cmp patch [#198332].
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ diffutils.spec ++++++
--- /var/tmp/diff_new_pack.oXQ1Ud/_old 2006-08-11 15:44:21.000000000 +0200
+++ /var/tmp/diff_new_pack.oXQ1Ud/_new 2006-08-11 15:44:21.000000000 +0200
@@ -19,7 +19,7 @@
Autoreqprov: on
PreReq: %{install_info_prereq}
Version: 2.8.7
-Release: 17
+Release: 18
Summary: GNU diff Utilities
Source: diffutils-%{version}.tar.gz
Patch1: diffutils-2.8.1-i18n-0.2.patch.gz
@@ -75,6 +75,8 @@
%doc %{_mandir}/man1/*.gz
%changelog -n diffutils
+* Fri Aug 11 2006 - schwab@suse.de
+- Update cmp patch [#198332].
* Mon Jul 24 2006 - rguenther@suse.de
- diffutils does not need help2man.
* Fri Mar 10 2006 - schwab@suse.de
++++++ cmp-eof-dev-null.diff ++++++
--- /var/tmp/diff_new_pack.oXQ1Ud/_old 2006-08-11 15:44:21.000000000 +0200
+++ /var/tmp/diff_new_pack.oXQ1Ud/_new 2006-08-11 15:44:21.000000000 +0200
@@ -1,13 +1,16 @@
-From nobody Fri Mar 10 21:59:04 2006
-From: Paul Eggert
-Subject: Re: diff: incorrect and undocumented cmp output when stdout is
- redirected
-To: Vincent Lefevre
-Cc: 356083@bugs.debian.org, bug-gnu-utils@gnu.org
-Date: Thu, 09 Mar 2006 12:56:25 -0800
+2006-05-09 Paul Eggert
-On second thought I have installed this patch instead, as it's simpler
-and a tad more efficient in the usual case:
+ * src/cmp.c (cmp): The previous fix wasn't quite right either, as
+ it mishandled 'cmp A B >/dev/null' when A is shorter than B and
+ differs before A's end-of-file, by outputting a bogus EOF message.
+ Also, it was inefficient if A and B were large.
+
+2006-05-07 Jim Meyering (tiny change)
+
+ Fix bug introduced in 2006-03-09 change:
+ cmp always exits successfully, when stdout is redirected to /dev/null.
+ * src/cmp.c (cmp): When there's a difference, arrange to return nonzero
+ also when comparison_type is the new (from 2006-03-09) type_no_stdout.
2006-03-09 Paul Eggert
@@ -16,8 +19,14 @@
generated and stdout is /dev/null.
Problem reported by Vincent Lefevre (Debian bug 356083).
+Index: cmp.c
+===================================================================
+RCS file: /sources/diffutils/diffutils/src/cmp.c,v
+retrieving revision 1.39
+retrieving revision 1.40
+diff -u -a -p -u -p -a -r1.39 -r1.40
--- cmp.c 5 Jan 2006 07:23:55 -0000 1.39
-+++ cmp.c 9 Mar 2006 20:54:39 -0000 1.41
++++ cmp.c 9 Mar 2006 20:38:11 -0000 1.40
@@ -78,6 +78,7 @@ static enum comparison_type
{
type_first_diff, /* Print the first difference. */
@@ -26,16 +35,21 @@
type_status /* Exit status only. */
} comparison_type;
-@@ -317,7 +318,7 @@ main (int argc, char **argv)
+@@ -317,7 +318,12 @@ main (int argc, char **argv)
if (fstat (STDOUT_FILENO, &outstat) == 0
&& stat (NULL_DEVICE, &nullstat) == 0
&& 0 < same_file (&outstat, &nullstat))
- comparison_type = type_status;
-+ comparison_type = type_no_stdout;
++ comparison_type =
++ ((fstat (STDERR_FILENO, &outstat) == 0
++ ? 0 < same_file (&outstat, &nullstat)
++ : errno == EBADF)
++ ? type_status
++ : type_no_stdout);
}
/* If only a return code is needed,
-@@ -356,7 +357,7 @@ main (int argc, char **argv)
+@@ -356,7 +362,7 @@ main (int argc, char **argv)
for (f = 0; f < 2; f++)
if (close (file_desc[f]) != 0)
error (EXIT_TROUBLE, errno, "%s", file[f]);
@@ -44,7 +58,7 @@
check_stdout ();
exit (exit_status);
return exit_status;
-@@ -536,6 +537,9 @@ cmp (void)
+@@ -536,6 +542,9 @@ cmp (void)
while (first_diff < smaller);
ret = EXIT_FAILURE;
break;
@@ -54,10 +68,97 @@
}
}
-
-
-_______________________________________________
-Bug-gnu-utils mailing list
-Bug-gnu-utils@gnu.org
-http://mail.gnu.org/mailman/listinfo/bug-gnu-utils
-
+Index: cmp.c
+===================================================================
+RCS file: /sources/diffutils/diffutils/src/cmp.c,v
+retrieving revision 1.40
+retrieving revision 1.41
+diff -u -a -p -u -p -a -r1.40 -r1.41
+--- cmp.c 9 Mar 2006 20:38:11 -0000 1.40
++++ cmp.c 9 Mar 2006 20:54:39 -0000 1.41
+@@ -318,12 +318,7 @@ main (int argc, char **argv)
+ if (fstat (STDOUT_FILENO, &outstat) == 0
+ && stat (NULL_DEVICE, &nullstat) == 0
+ && 0 < same_file (&outstat, &nullstat))
+- comparison_type =
+- ((fstat (STDERR_FILENO, &outstat) == 0
+- ? 0 < same_file (&outstat, &nullstat)
+- : errno == EBADF)
+- ? type_status
+- : type_no_stdout);
++ comparison_type = type_no_stdout;
+ }
+
+ /* If only a return code is needed,
+Index: cmp.c
+===================================================================
+RCS file: /sources/diffutils/diffutils/src/cmp.c,v
+retrieving revision 1.43
+retrieving revision 1.44
+diff -u -a -p -u -p -a -r1.43 -r1.44
+--- cmp.c 13 Mar 2006 19:11:17 -0000 1.43
++++ cmp.c 8 May 2006 01:41:04 -0000 1.44
+@@ -536,10 +536,10 @@ cmp (void)
+ first_diff++;
+ }
+ while (first_diff < smaller);
+- ret = EXIT_FAILURE;
+- break;
+
++ /* Fall through. */
+ case type_no_stdout:
++ ret = EXIT_FAILURE;
+ break;
+ }
+ }
+Index: cmp.c
+===================================================================
+RCS file: /sources/diffutils/diffutils/src/cmp.c,v
+retrieving revision 1.44
+retrieving revision 1.45
+diff -u -a -p -u -p -a -r1.44 -r1.45
+--- cmp.c 8 May 2006 01:41:04 -0000 1.44
++++ cmp.c 9 May 2006 22:57:20 -0000 1.45
+@@ -382,7 +382,7 @@ cmp (void)
+ word *buffer1 = buffer[1];
+ char *buf0 = (char *) buffer0;
+ char *buf1 = (char *) buffer1;
+- int ret = EXIT_SUCCESS;
++ int differing = 0;
+ int f;
+ int offset_width IF_LINT (= 0);
+
+@@ -536,17 +536,18 @@ cmp (void)
+ first_diff++;
+ }
+ while (first_diff < smaller);
++ differing = -1;
++ break;
+
+- /* Fall through. */
+ case type_no_stdout:
+- ret = EXIT_FAILURE;
++ differing = 1;
+ break;
+ }
+ }
+
+ if (read0 != read1)
+ {
+- if (comparison_type != type_status)
++ if (differing <= 0 && comparison_type != type_status)
+ {
+ /* See POSIX 1003.1-2001 for this format. */
+ fprintf (stderr, _("cmp: EOF on %s\n"), file[read1 < read0]);
+@@ -555,9 +556,9 @@ cmp (void)
+ return EXIT_FAILURE;
+ }
+ }
+- while (read0 == buf_size);
++ while (differing <= 0 && read0 == buf_size);
+
+- return ret;
++ return differing == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
+ }
+
+ /* Compare two blocks of memory P0 and P1 until they differ,
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...