BTS

Message4958

Author Xk2c
Recipients
Date 2015-05-18.17:35:33
Content
Michael Prokop schrieb/wrote:

-- <snip> --
>> Attached patch fixes this.
> 
> I think the present logic is fine:
> 
> | % sll =java
> | lrwxrwxrwx 1 root root 22 Nov 28  2013 /usr/bin/java -> /etc/alternatives/java
> | lrwxrwxrwx 1 root root 46 Nov 28  2013 /etc/alternatives/java -> /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java

ahh ok. I have not been aware of this = thing.
I tried like this:
% l
total 0
-rw------- 1 user user 0  19:23 18.05.2015  file
lrwxrwxrwx 1 user user 4  19:24 18.05.2015  lnk1 -> file
% sll lnk1
lrwxrwxrwx 1 user user 4 Mai 18 19:24 lnk1 -> file

Which gave me nothing more usefull over ls -l. But as i understand its purpose
is to do a $path lookup first, which in turn is neat.

> So /usr/bin/java is my java binary in $PATH, pointing to
> /etc/alternatives/java which itself points to
> /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java.
> 
> With your patch we would get:
> 
> | % sll =java
> | lrwxrwxrwx 1 root root 46 Nov 28  2013 /etc/alternatives/java -> /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
> | -rwxr-xr-x 1 root root 6368 Apr 26 15:48 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
> 
> ... which dereferences the files before listing them, so the
> output is incomplete because of the missing /usr/bin/java ->
> /etc/alternatives/java connection.
> 
> What we might want do though is actually adding a full listing of
> the resulting target file, so being
> /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java in the above example
> - maybe that's the point you're trying to address? So what might be
> interesting to get is:
> 
> | % sll =java
> | lrwxrwxrwx 1 root root 22 Nov 28  2013 /usr/bin/java -> /etc/alternatives/java
> | lrwxrwxrwx 1 root root 46 Nov 28  2013 /etc/alternatives/java -> /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
> | -rwxr-xr-x 1 root root 6368 Apr 26 15:48 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
> 
> I'd definitely appreciate and welcome a patch which implements that.

I look into this. And also in updating its comment and usage hint.

Thanks!

kind regards,

     Thilo
History
Date User Action Args
2015-05-18 17:35:33Xk2clinkissue1351 messages
2015-05-18 17:35:33Xk2ccreate