[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-cpio] Re: Destination directory patch
From: |
P J P |
Subject: |
Re: [Bug-cpio] Re: Destination directory patch |
Date: |
Sat, 24 Jul 2010 13:22:06 +0530 (IST) |
Hi, thanks for the tar file, it built properly.
--- On Sat, 24/7/10, Sergey Poznyakoff <address@hidden> wrote:
> Yes, of course. They *must* have different values,
> otherwise -D is of no use. Looks like you did not understand its
> semantics. The change_directory_option supplies *source directory* and
> the directory_name gives *destination directory*. As an
> example, consider this:
That doesn't sound good. It's confusing.
> cpio -D /usr -p /usr/local < filelist
>
> (it is supposed that filelist contains names relative to
> /usr, of course).
Here, the redirection will be done by the shell, so the paths in the
file-list should either be absolute or relative to the current directory.
Otherwise shell will say - No such file or directory.
1. While creating a cpio archive, the input/output files are
redirected by the shell, there is no point in changing to any source
directory.
2. While extraction it helps because files are extracted to the current
working directory of the process. Which means -D <DIR> is a destination
directory, rather than a source directory.
3. In copy-pass mode again, input files are redirected by the shell,
and as per your semantics destination directory is given by
directory_name, which renders -D <DIR> useless.
I think the semantics needs some re-thinking.
---
Regards
-Prasad
PS: Please don't send me html/attachment/Fwd mails
Re: [Bug-cpio] Re: Destination directory patch, Sergey Poznyakoff, 2010/07/23