-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix version reading for some of development tools #591
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't see how to fix "Python (default)" within this function: it targets stderr for python
command but this works only for python2. When this command points to python3, it's stdout ignored.
Maybe just remove that line?
@@ -1432,6 +1432,7 @@ gboolean hardinfo_spawn_command_line_sync(const gchar *command_line, | |||
GError **error) | |||
{ | |||
shell_status_pulse(); | |||
DEBUG("Trying: %s", command_line); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind if I leave it here? It slightly helps to discover how hardinfo works internally.
@@ -294,7 +294,8 @@ void scan_dev(gboolean reload) | |||
{ N_("LLDB"), "lldb --version", "(?<=lldb version )(\\d\\.?)+", TRUE }, | |||
{ N_("strace"), "strace -V", "\\d+\\.\\d+\\.?\\d*", TRUE }, | |||
{ N_("valgrind"), "valgrind --version", "\\d+\\.\\d+\\.\\S+", TRUE }, | |||
{ N_("QMake"), "qmake --version", "\\d+\\.\\S+", TRUE}, | |||
{ N_("QMake (Qt 5)"), "qmake-qt5 --version", "\\d+\\.\\S+", TRUE}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qmake
binary (or symlink) is not always installed, and there can be more than one present.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where are qt4 related here? some 3thr party system only runs in qt4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out. I remember qt4 being unsupported for five years, but it looks like at least stable debian has it, thus it should be supported here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does not matter is are supproted or not.. currently there are complete desktop build around qt4 you know it? trinity desktop! and some NASA related programs only runs under qt4 and python2 you know it?
@@ -280,7 +280,7 @@ void scan_dev(gboolean reload) | |||
{ N_("C (Clang)"), "clang -v", "\\d+\\.\\d+", FALSE }, | |||
{ N_("D (dmd)"), "dmd --help", "\\d+\\.\\d+", TRUE }, | |||
{ N_("Gambas3 (gbc3)"), "gbc3 --version", "\\d+\\.\\d+\\.\\d+", TRUE }, | |||
{ N_("Java"), "javac -version", "\\d+\\.\\d+\\.\\d+", FALSE }, | |||
{ N_("Java"), "javac -version", "(?<=javac )(\\d+.?)+", TRUE }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Java is a mess. Recent versions (checked on 11) report version to stdout while older (checked 6 and 8) write it to stderr. But taking into account that 11 is only LTS available (for "casual" users) and java 8 have no public updates anymore, should be safe to use newer way from now.
Regex changed because I've seen javac 11.0.9.1
on centos 7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
almost 90% of 3trh party java progams does not runs with "only LTS available", almost java 8 are commonly used today, seems you are talking only about openjdk right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my experience there is only single java
binary installed inside /bin or /usr/bin in various distributions.
Played with centos:7 container just to be sure. /usr/bin/java
symlinked to /etc/alternatives/java
which is symlinked to one of javas inside /usr/lib/jvm
.
this is a mess.. for those software that are crap in versioning (python java etc) is better to provide module for deteccion and present as comma separated string by example:
|
Thanks, @kapsh! Since you marked this PR as a draft, here are some suggestions to improve this feature:
|
@lpereira @mckaygerhard I believe that your suggestions can be summarised in this way:
Sounds fine? |
By wildcard might be a problem, because, let's say we glob on |
Yeah, thanks, that's a good point I did miss.
Wild shot: wildcards could be stricter: `python?.?, python?, python` to
filter everything else out, maybe there is a better way too.
IOW it would be nice to avoid hardcoded values at all (as qmake family in
current patch) while keeping code as simple as possible.
…On 1 February 2021 20:31:30 "Leandro A. F. Pereira" ***@***.***> wrote:
By wildcard might be a problem, because, let's say we glob on python*, and
there's a program called python-something in the path; that'll be executed,
too.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
The |
No description provided.