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: Peter Fales
Subject: Re: Test failures in sharutils-4.13.3
Date: Mon, 4 Mar 2013 21:53:34 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Thanks for the patch.   That made a difference, but still doesn't seem
quite right.   When -L is used the first archive looks like this:

     1  #!/bin/sh
     2  # This is shar-3-test, a shell archive (produced by GNU sharutils 
4.13.3).
     3  # To extract the files from this archive, save it to some FILE, remove
     4  # everything before the `#!/bin/sh' line above, then type `sh FILE'.
     5  #
     6  lock_dir=_sh20644
     7  # Made on 2013-03-04 21:46 CST by <address@hidden>.
     8  # Source directory was 
`/opt/exp/expmake/build/gnucoresrc/build/sharutils'.
     9  #
    10  # Existing files will *not* be overwritten, unless `-c' is specified.
    11  #
    12  # This is part 1 of a multipart archive.
    13  # Do not concatenate these parts, unpack them in orderwith `/bin/sh'.
    14  echo 2 > ${lock_dir}/seq
    15  exit 0
    16   mode       name
    17  # ------ ---------- ------------------------------------------
    18  # 788742 -rwxrwxr-x configure
    19  #

The "echo 2" line moved from a byte offset of 0 at the very beginning
of the file to it's current location at line 14.   However, nothing has
created that directory, so the script dies on line 14.



On Mon, Mar 04, 2013 at 06:50:25PM -0800, Bruce Korb wrote:
> 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))

-- 
Peter Fales
Alcatel-Lucent
Member of Technical Staff
1960 Lucent Lane
Room: 9H-505
Naperville, IL 60566-7033
Email: address@hidden
Phone: 630 979 8031



reply via email to

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