bug-cpio
[Top][All Lists]
Advanced

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

[Bug-cpio] Re: Destination directory patch


From: P J P
Subject: [Bug-cpio] Re: Destination directory patch
Date: Fri, 23 Jul 2010 18:23:55 +0530 (IST)

   Hi,
 
> --- On Fri, 23/7/10, Sergey Poznyakoff <address@hidden>
> wrote:
> > Yes, if the target directory is not absolute.

    Not just relative paths, it'll create problems whenever 
change_directory_option != directory_name.
 
  if (change_directory_option && !ISSLASH (directory_name[0]))
 
   - checking `change_directory_option' makes no difference here. In fact if 
change_directory_option is NULL, and directory_name[0] != '/', then this will 
fail, because directory_name is not an absolute path.
  
     {
       char *pwd = xgetcwd ();
 
       dirname_len += strlen (pwd) + 1;
       ds_init (&output_name, dirname_len + 2);
       strcpy (output_name.ds_string, pwd);
       strcat (output_name.ds_string, "/");
       strcat (output_name.ds_string, directory_name);
     }
   else
     {
       ds_init (&output_name, dirname_len > + 2);
       strcpy (output_name.ds_string, directory_name);
     }
 
In either case, output_name.ds_string starts with the directory_name, which 
could be different from change_directory_option, because in src/main.c 
directory_name = argv[index]
 
Also change_dir() could create problems if the input file paths are relative to 
the current directory.
 
 $ cpio -dD /tmp/dir1 -p /tmp/dir2 < ../input-file1 ./abc/input-file2 ...


Second, ./bootstrap and ./configure works but make still fails with
 
...
Making all in src
Making all in po
*** error: gettext infrastructure mismatch: using a
Makefile.in.in from gettext version 0.17 but the autoconf
macros are from gettext version 0.18
make[2]: *** [check-macro-version] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
 
hope that helps.
---
Regards
    -Prasad
PS: Please don't send me html/attachment/Fwd mails






reply via email to

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