bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Test failures in sharutils-4.13.3


From: Bruce Korb
Subject: Re: Test failures in sharutils-4.13.3
Date: Mon, 04 Mar 2013 18:50:25 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2

On 03/04/13 14:14, Peter Fales wrote:
> I'm getting corrupt output from sharutils when the -L  option is used.

Uh, oh.

> If gotten as far determing that SPLIT_SIZE_LIMIT is marked as 
> unused when it reaches line 970 in shar.c, so archive_type_position
> is not set on line 980.

The options "-l" and "-L" form an option "equivalence class".
The status of the option should be tested with HAVE_OPT(WHOLE_SIZE_LIMIT)
not HAVE_OPT(SPLIT_SIZE_LIMIT).

I'm in the middle of patches for I18N, so here is a hand patch for it:

$ diff -u shar.c~ shar.c
--- shar.c~     2013-01-04 22:16:01.000000000 -0800
+++ shar.c      2013-03-04 18:49:11.894292390 -0800
@@ -967,7 +967,7 @@
     fputs ("# The unsharer will be INTERACTIVELY queried.\n",
           output);

-  if (HAVE_OPT(SPLIT_SIZE_LIMIT))
+  if (HAVE_OPT(WHOLE_SIZE_LIMIT))
     {
       int len = snprintf (explain_text_fmt, sizeof (explain_text_fmt),
                           explain_fmt_fmt, explain_1_len, explain_2_len);
@@ -1563,8 +1563,9 @@
       *size_left_p = OPT_VALUE_WHOLE_SIZE_LIMIT - current_size;
       DEBUG_PRINT (_("In shar: remaining size %s\n"), *size_left_p);

-      if (!HAVE_OPT(SPLIT_SIZE_LIMIT) && current_size > first_file_position
-          && (encoded_size > *size_left_p))
+      if (  (WHICH_OPT_WHOLE_SIZE_LIMIT != VALUE_OPT_SPLIT_SIZE_LIMIT)
+         && (current_size > first_file_position)
+         && (encoded_size > *size_left_p))
         {
           change_files (*rnameq_p, size_left_p);
           current_size = ftell (output);
@@ -2202,7 +2203,7 @@

   /* Delete the sequence file, if any.  */

-  if (HAVE_OPT(SPLIT_SIZE_LIMIT) && part_number > 1)
+  if (HAVE_OPT(WHOLE_SIZE_LIMIT) && part_number > 1)
     {
       fprintf (output, echo_string_z, SM_you_are_done);
       if (HAVE_OPT(QUIET))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]