Modify

Opened 12 years ago

Closed 12 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 12 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 by Daeron, 12 years ago

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 by Don-vip, 12 years ago

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

comment:3 by Don-vip, 12 years ago

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 by Don-vip, 12 years ago

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 by Don-vip, 12 years ago

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

in reply to:  5 comment:6 by Daeron, 12 years ago

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 by Don-vip, 12 years ago

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

comment:8 by Don-vip, 12 years ago

In 5877/josm:

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

comment:9 by Don-vip, 12 years ago

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

comment:10 by Don-vip, 12 years ago

Resolution: fixed
Status: newclosed

comment:11 by Don-vip, 12 years ago

Resolution: fixed
Status: closedreopened

comment:12 by Don-vip, 12 years ago

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 12 years ago by Don-vip (previous) (diff)

comment:13 by stoecker, 12 years ago

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 by stoecker, 12 years ago

And no, we got these also before this change.

comment:15 by Don-vip, 12 years ago

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 by stoecker, 12 years ago

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

comment:17 by stoecker, 12 years ago

Resolution: fixed
Status: reopenedclosed

In 5885/josm:

fix quoted texts (fix #8616)

comment:18 by Don-vip, 12 years ago

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 by Don-vip, 12 years ago

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

in reply to:  18 comment:20 by stoecker, 12 years ago

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 by Don-vip, 12 years ago

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.