[Bug 1536] JDK source install instructions seem to be slightly incorrect.

DJ Lucas dj at linuxfromscratch.org
Sun Aug 21 18:35:46 PDT 2005


Randy McMurchy wrote:
> DJ Lucas wrote these words on 08/21/05 20:12 CST:
> 
>>Paul Bowyer wrote:
>>
>>
>>>What happened was this:
>>>
>>>"cp -v -a j2sdk-image /opt/jdk/jdk-1.5.0" placed the "j2sdk-image" directory 
>>>in "/opt/jdk/jdk-1.5.0" rather than just its contents as was probably 
>>>intended.
>>
>>This means that the /opt/jdk/jdk-1.5.0 directory already exists.  The
>>behavior is correct as the directory should not be there.
>>
>>Your error is here:
>>
>>
>>>   /usr/lib/pkgusr/install -v -d /opt/jdk/jdk-1.5.0
>>
>>Which should be not there at all.
> 
> 
> No, DJ, what you are saying is not right. The books instructions
> do moves of the files and not copies. His script I believe just
> needs to be cp -v -a j2sdk-image/*. But why does it have to be
> modified anyway?  sigh....
> 
> BTW, DJ, cp -a is the same as cp -dpR which copies recursively.
> Because a directory is specified as the source, it will always
> get copied, regardless whether or not a target directory exists.
> 

I think you've interpreted the above message incorrectly.  That was the
modified script that was displayed.  If he did 'cp -a j2sdk-image
/opt/jdk/jdk-1.5.0' and /opt/jdk/jdk-1.5.0 was an existing directory
then his result is exactly what was expected.  His modified script was
correct...however it was a problem with his script, not the book's
instructions.

[dj at name1 ~]# mkdir testcpa1
[dj at name1 ~]# mkdir testcpa2
[dj at name1 ~]# touch testcpa1/testfile
[dj at name1 ~]# cp -a testcpa1/ testcpa2/
[dj at name1 ~]# ls -l testcpa2/testcpa1/testfile
-rw-r--r--  1 dj dj 0 Aug 21 20:25 testcpa2/testcpa1/testfile
[dj at name1 ~]# rm -rf testcpa2/
[dj at name1 ~]# cp -a testcpa1/ testcpa2
[dj at name1 ~]# ls -l testcpa2/
total 0
-rw-r--r--  1 dj dj 0 Aug 21 20:25 testfile
[dj at name1 ~]#

-- DJ Lucas




More information about the blfs-book mailing list