bug-coreutils
[Top][All Lists]
Advanced

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

bug#10837: Fw:Re:Re: bug#10837: bug of install program


From: 陈燕潘
Subject: bug#10837: Fw:Re:Re: bug#10837: bug of install program
Date: Wed, 22 Feb 2012 02:03:58 +0800 (CST)





-------- Forwarding messages --------
From: "陈燕潘" <address@hidden>
Date: 2012-02-19 23:07:19
To: "Eric Blake" <address@hidden>
Cc: address@hidden
Subject: Re:Re: bug#10837: bug of install program

Thank you for yourreply, but I'mstilla little trouble.
Because there is a directory d in 1/a/b/c.  So the command you recommend did 
not work well.
 
opensuse113:/home/test_install # install -d 2/a/b/c && install 1/a/b/c/* 2/a/b/c
install: omitting directory `1/a/b/c/d'

How can I do please?
Thanks.
 
--
custa



在 2012-02-18 02:50:17,"Eric Blake" <address@hidden> 写道:
>tag 10837 notabug
>thanks
>
>On 02/17/2012 10:30 AM, 陈燕潘 wrote:
>> Hi, I come across a problem, I don't whether it is a bug.
>> Version of install is 7.1.
>
>Thanks for the report.  Your install is a bit old; right now, the
>current version is 8.15.  However, the behavior you are reporting is
>intentional, and has not changed in the meantime.
>
>> I have something look like this:
>> opensuse113:/home/test_install # find 1/
>> 1/
>> 1/a
>> 1/a/b
>> 1/a/b/c
>> 1/a/b/c/d.txt
>> 1/a/b/c/d
>> opensuse113:/home/test_install # find 2/
>> 2/
>> I want to copy everything in 1/a/b/c to 2/a/b/c. So I use the command with 
>> the option -D, but it doesn't work.
>> opensuse113:/home/test_install # install -D 1/a/b/c/* 2/a/b/c
>> install: target `2/a/b/c' is not a directory
>
>Let's revisit the 'install --help' output, and see why:
>
>Usage: install [OPTION]... [-T] SOURCE DEST
>  or:  install [OPTION]... SOURCE... DIRECTORY
>  or:  install [OPTION]... -t DIRECTORY SOURCE...
>  or:  install [OPTION]... -d DIRECTORY...
>...
>In the first three forms, copy SOURCE to DEST or multiple SOURCE(s) to
>the existing DIRECTORY, while setting permission modes and owner/group.
>...
>  -D                  create all leading components of DEST except the last,
>                        then copy SOURCE to DEST
>
>> 
>> Wht not create the directory 2/a/b/c, then copy everying?
>
>Note that you ended up invoking the second form (multiple source files,
>to an existing directory), but that -D is only useful with the first
>form (single source file, and a DEST that gets created with the same
>contents as the single source).  That is, we intentionally treat the
>DEST of form 1 differently than the DIRECTORY of form 2.
>
>>  
>> Looking forward to your reply.
>
>I'd recommend that you split this into two steps, which will work now:
>
>install -d 2/a/b/c && install 1/a/b/c/* 2/a/b/c
>
>Or, you can propose a patch to make -D work with the second form (that
>is, have it interact with a DIRECTORY by creating all elements, compared
>to its current documentation of interacting only with a DEST where only
>the leading directories, but not the last element, are created).  But
>I'm not sure if such a patch would make matters more confusing.  Maybe
>it's better to just propose a patch that rejects -D when using form 2,
>rather than the current behavior of accepting -D only to fail because it
>would create 2/a/b but not 2/a/b/c, and needs 2/a/b/c to exist as a
>target directory.
>
>But since such a patch is a wishlist for a minor improvement, rather
>than an actual bug fix, I'm closing this bug for now.  We can reopen it
>if needed, and you can feel free to add further comments even while the
>bug is closed.
>
>-- 
>Eric Blake   address@hidden    +1-919-301-3266
>Libvirt virtualization library http://libvirt.org
>




reply via email to

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