[Bug 789114] New: "which" pointing to update-alternatives only displays generic component
https://bugzilla.novell.com/show_bug.cgi?id=789114 https://bugzilla.novell.com/show_bug.cgi?id=789114#c0 Summary: "which" pointing to update-alternatives only displays generic component Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: x86-64 OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: tonysu@su-networking.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0 Don't believe this existed prior to 12.2. I know that this did not exist 11.3 and prior. "which" is a common way to identify what component and its version is currently running on the system. When pointing to a component managed by update-alternatives only a generic component name is displayed, in this case "java" Reproducible: Always Steps to Reproduce: In a console: which java Actual Results: /usr/bin/java Expected Results: Expected to see the full name of the java currently running including its version. Most likely the package name. By inspecting the properties of /usr/bin/java, it looks like it points to "alternatives" which I assume is "update-alternatives" I am suggesting a "normal" severity only because I assume most people would not know to run update-alternatives and the output to "which" does not provide any clue to look in update-alternatives. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=789114
https://bugzilla.novell.com/show_bug.cgi?id=789114#c
Jiaying ren
https://bugzilla.novell.com/show_bug.cgi?id=789114
https://bugzilla.novell.com/show_bug.cgi?id=789114#c1
Michal Vyskocil
https://bugzilla.novell.com/show_bug.cgi?id=789114
https://bugzilla.novell.com/show_bug.cgi?id=789114#c2
--- Comment #2 from Michal Vyskocil
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0
Don't believe this existed prior to 12.2. I know that this did not exist 11.3 and prior.
BTW: this is definitelly not a true # this is like openSUSE 11.1 $ rpm -q util-linux util-linux-2.19.1-6.31.1 $ which git /usr/bin/git $ readlink -f $(which git) /usr/lib/git/git-add which have never resolved symlinks, to my knowledge ... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=789114
https://bugzilla.novell.com/show_bug.cgi?id=789114#c3
Petr Uzel
It might be good idea to add a switch to which to perform the readlink(). Petr, what do you think?
canonicalize_file_name(3) will be better I guess. I'll cook up a patch and send it to upstream when time permits. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=789114
https://bugzilla.novell.com/show_bug.cgi?id=789114#c4
--- Comment #4 from Petr Uzel
https://bugzilla.novell.com/show_bug.cgi?id=789114
https://bugzilla.novell.com/show_bug.cgi?id=789114#c5
Carlo Wood
which java /usr/bin/java
readlink -f $(which java) /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java
Where /usr/bin/java -> /etc/alternatives/java -> /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java As no other 'which' supports --resolv-path I think I'd be doing the community a disfavour by motivating them to write non-portable (non POSIX) scripts with a GNU extension that isn't really needed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=789114
https://bugzilla.novell.com/show_bug.cgi?id=789114#c6
Petr Uzel
https://bugzilla.novell.com/show_bug.cgi?id=789114
https://bugzilla.novell.com/show_bug.cgi?id=789114#c7
--- Comment #7 from Tony Su
participants (1)
-
bugzilla_noreply@novell.com