On Fri, 11 Aug 2023, 23:55 Mitch Burton, <email address hidden> wrote:
> May I suggest we move away from parsing lsb_release output (or file) and
> instead use /etc/os-release or /usr/lib/os-release? I think generally
> it's more standardized.
>
> See example: https://github.com/Perfect5th/landscape-
>
> client/blob/c5f6a4b673eb5f86281a8183242ae26e8580ca6b/landscape/lib/lsb_release.py#L73-L87
>
> --
> You received this bug notification because you are subscribed to
> Landscape Project.
> Matching subscriptions: Landscape Project
> https://bugs.launchpad.net/bugs/2031036
>
> Title:
> Error when parsing lsb_release, landscape-package-reporter unable to
> report package list to server
>
> Status in Landscape Client:
> In Progress
>
> Bug description:
> Package reporter from landscape client is failing to report to server
> because seemingly of a lsb parse issue.
>
> /var/log/landscape/package-reporter.log
>
> 2023-08-10 13:42:00,414 ERROR [MainThread] None
> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line
> 653, in _runCallbacks
> current.result = callback(current.result, *args, **kw)
> File
> "/usr/lib/python3/dist-packages/landscape/client/package/taskhandler.py",
> line 217, in got_server_uuid
> lsb_release_info = parse_lsb_release(self.lsb_release_filename)
> File "/usr/lib/python3/dist-packages/landscape/lib/lsb_release.py",
> line 31, in parse_lsb_release
> dist, desc, release, code_name, _ = lsb_info.decode().split("\n")
> ValueError: too many values to unpack (expected 5)
>
> Multiple LSB Packages are installed
>
> /usr/bin/lsb_release
> LSB Version:
> core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
>
> lsb_release -a
> LSB Version:
> core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
> Distributor ID: Ubuntu
> Description: Ubuntu 18.04.3 LTS
> Release: 18.04
> Codename: bionic
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/landscape-client/+bug/2031036/+subscriptions
>
>
I agree with you. I will have a look on it.
On Fri, 11 Aug 2023, 23:55 Mitch Burton, <email address hidden> wrote:
> May I suggest we move away from parsing lsb_release output (or file) and os-release? I think generally /github. com/Perfect5th/ landscape- blob/c5f6a4b673 eb5f86281a81832 42ae26e8580ca6b /landscape/ lib/lsb_ release. py#L73- L87 /bugs.launchpad .net/bugs/ 2031036 package- reporter unable to landscape/ package- reporter. log python3/ dist-packages/ twisted/ internet/ defer.py" , line current. result, *args, **kw) python3/ dist-packages/ landscape/ client/ package/ taskhandler. py", release( self.lsb_ release_ filename) python3/ dist-packages/ landscape/ lib/lsb_ release. py", decode( ).split( "\n") lsb_release 20170808ubuntu1 -noarch: printing- 9.20170808ubunt u1-noarch: security- 9.20170808ubunt u1-noarch 20170808ubuntu1 -noarch: printing- 9.20170808ubunt u1-noarch: security- 9.20170808ubunt u1-noarch /bugs.launchpad .net/landscape- client/ +bug/2031036/ +subscriptions
> instead use /etc/os-release or /usr/lib/
> it's more standardized.
>
> See example: https:/
>
> client/
>
> --
> You received this bug notification because you are subscribed to
> Landscape Project.
> Matching subscriptions: Landscape Project
> https:/
>
> Title:
> Error when parsing lsb_release, landscape-
> report package list to server
>
> Status in Landscape Client:
> In Progress
>
> Bug description:
> Package reporter from landscape client is failing to report to server
> because seemingly of a lsb parse issue.
>
> /var/log/
>
> 2023-08-10 13:42:00,414 ERROR [MainThread] None
> Traceback (most recent call last):
> File "/usr/lib/
> 653, in _runCallbacks
> current.result = callback(
> File
> "/usr/lib/
> line 217, in got_server_uuid
> lsb_release_info = parse_lsb_
> File "/usr/lib/
> line 31, in parse_lsb_release
> dist, desc, release, code_name, _ = lsb_info.
> ValueError: too many values to unpack (expected 5)
>
> Multiple LSB Packages are installed
>
> /usr/bin/
> LSB Version:
> core-9.
>
> lsb_release -a
> LSB Version:
> core-9.
> Distributor ID: Ubuntu
> Description: Ubuntu 18.04.3 LTS
> Release: 18.04
> Codename: bionic
>
> To manage notifications about this bug go to:
> https:/
>
>