Modify

Opened 7 years ago

Closed 7 years ago

#8616 closed defect (fixed)

Cannot determine OS detailed information on not LSB-compliant Linux systems

Reported by: Daeron Owned by: Don-vip
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc: stoecker

Description

If a Linux system, eg. Gentoo, is not LSB-compliant, and thus doesn't contain a lsb_release -command, a lot of useless stack traces are printed because josm tries to get the version of the system by calling it.

As it doesn't affect the operation of josm at all, this stack trace is completely useless.

Attached patch removes printing of the stack trace.

Attachments (1)

dont-print-stack-trace-if-lsb_release-failed.patch (503 bytes) - added by Daeron 7 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 7 years ago by Daeron

Summary: A lot of useless stack traces are printed if a Linux system is not LSB-compliant[PATCH] A lot of useless stack traces are printed if a Linux system is not LSB-compliant

comment:2 Changed 7 years ago by Don-vip

This is not totally useless as it points out we need to implement something else for Gentoo. What is the equivalent command ?

comment:3 Changed 7 years ago by Don-vip

Priority: trivialnormal
Summary: [PATCH] A lot of useless stack traces are printed if a Linux system is not LSB-compliantCannot determine OS detailed information on not LSB-compliant Linux systems
Type: enhancementdefect

comment:4 Changed 7 years ago by Don-vip

Funny, some people seem to have lsb_release on Gentoo:

O          6 ( 0.2%) Linux Gentoo Base System release 2.1
O          1 ( 0.0%) Linux Gentoo Base System release 2.2

comment:5 Changed 7 years ago by Don-vip

Can you please post the contents of your /etc/*-release file(s) ? Thanks.

comment:6 in reply to:  5 Changed 7 years ago by Daeron

Replying to Don-vip:

Can you please post the contents of your /etc/*-release file(s) ? Thanks.

$ ls /etc/*-release
/etc/gentoo-release
$ cat /etc/gentoo-release
Gentoo Base System release 2.1

That version is essentially the version of the baselayout package.

There exists also a package for lsb_release, but AFAIK no package depends on it, so most Gentoo users won't have it installed.

See also: https://bugs.gentoo.org/show_bug.cgi?id=107162

comment:7 Changed 7 years ago by Don-vip

Ok thanks, I commit something right now, tell me if it works :)

comment:8 Changed 7 years ago by Don-vip

In 5877/josm:

see #8616 - Attempt to determine OS detailed version on some non LSB-compliant Linux systems

comment:9 Changed 7 years ago by Don-vip

(it's working if in your status report, the line starting with "Identification" contains "Gentoo")

comment:10 Changed 7 years ago by Don-vip

Resolution: fixed
Status: newclosed

comment:11 Changed 7 years ago by Don-vip

Resolution: fixed
Status: closedreopened

comment:12 Changed 7 years ago by Don-vip

Cc: stoecker added

Dirk, this change you've made won't work, it's caused by what I did in this ticket. Looks like Gentoo uses two different formats for the very same file, that's a shame !

Last edited 7 years ago by Don-vip (previous) (diff)

comment:13 Changed 7 years ago by stoecker

Why it won't work? We get proper NAME=Gentoo entries from lsb_release call (a bug I assume). This change strips "NAME=" from it.

comment:14 Changed 7 years ago by stoecker

And no, we got these also before this change.

comment:15 Changed 7 years ago by Don-vip

It will work if it comes from lsb_release, but not if it comes from a direct read of /etc/gentoo-release

If it contains NAME=Gentoo, then the file must probably be parsed the same way as /etc/os-release

comment:16 Changed 7 years ago by stoecker

I now again get "" encapsulated strings. Probably the ""replace needs to be added for your workaround system detection as well.

comment:17 Changed 7 years ago by stoecker

Resolution: fixed
Status: reopenedclosed

In 5885/josm:

fix quoted texts (fix #8616)

comment:18 Changed 7 years ago by Don-vip

Resolution: fixed
Status: closedreopened

Thanks, it effectively fixes this problem with quoted strings.
I still need to make other changes to handle the case of "NAME=XXX" to parse the file correctly.

comment:19 Changed 7 years ago by Don-vip

Owner: changed from team to Don-vip
Status: reopenednew

comment:20 in reply to:  18 Changed 7 years ago by stoecker

I still need to make other changes to handle the case of "NAME=XXX" to parse the file correctly.

As said, these were there before your changes, so it can't be related.

comment:21 Changed 7 years ago by Don-vip

Resolution: fixed
Status: newclosed

Mmmm ok let's see if I'm wrong :)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.