Does lsb_release depend on apt?

Asked by Joe Bill Schirtzinger

I am running puppy linux bionic distro. When I run lsb_release it fails and complains about apt thusly:

Traceback (most recent call last):
  File "/usr/bin/lsb_release", line 95, in <module>
    main()
  File "/usr/bin/lsb_release", line 59, in main
    distinfo = lsb_release.get_distro_information()
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 389, in get_distro_information
    distinfo = guess_debian_release()
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 331, in guess_debian_release
    rinfo = guess_release_from_apt()
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 236, in guess_release_from_apt
    releases = parse_apt_policy()
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 219, in parse_apt_policy
    close_fds=True).communicate()[0].decode('utf-8')
  File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'apt-cache': 'apt-cache'

The error of course is apt based. Since I am using puppy, I don't have apt. Lsb_release says it does not depend on apt, but then fails on apt. Am I missing something?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu lsb Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

This is support for Ubuntu only, and not for operating systems that are "based on Ubuntu" like puppy linux.

You should look elsewhere for help with puppy Linux, e.g. http://murga-linux.com/puppy/

Revision history for this message
Joe Bill Schirtzinger (jbschirtznger) said :
#2

I am not asking for help with puppy. I am asking for help about the package
that is from ubuntu that happens to be on puppy.

On Sat, May 18, 2019 at 4:37 PM Manfred Hampl <
<email address hidden>> wrote:

> Your question #680919 on lsb in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/lsb/+question/680919
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> This is support for Ubuntu only, and not for operating systems that are
> "based on Ubuntu" like puppy linux.
>
> You should look elsewhere for help with puppy Linux, e.g. http://murga-
> linux.com/puppy/
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/lsb/+question/680919/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/lsb/+question/680919
>
> You received this question notification because you asked the question.
>

--
Joe Bill Schirtzinger
Beit Eshel Elder Advisor
http://www.beitesheldonate.org | (270) 681-5728

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

We do not know what puppy is doing with Ubuntu's packages. Please ask there.

And, by the way, the package that installs the lsb_release python script is not lsb, but lsb-release (at least on Ubuntu).

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

Sorry, forget the second part of my previous comment; I mixed up the name of the binary package (which is lsb-release) and the name of the source package (which is lsb).

Revision history for this message
Joe Bill Schirtzinger (jbschirtznger) said :
#5

So you believe that puppy which in no way depends on the apt-package
manager is doing something that would suddenly make it depend on apt, the
package manager it does not have? Doesn't it seem more likely to you that
Ubuntu, which has apt, might have modified the package since it is the one
that would benefit from such modification? If so, where would YOU go to ask
that question, Ubuntu or puppy? Keep in mind, puppy has no apt whatsoever.
Your original link generates an error by the way.

So, can you answer my question from an Ubuntu perspective? Do that, and
I'll be on my way. Here is the question: does lsb as an ubuntu package
depend on apt or not at this very moment in time?

On Sun, May 19, 2019 at 9:02 AM Manfred Hampl <
<email address hidden>> wrote:

> Your question #680919 on lsb in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/lsb/+question/680919
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> We do not know what puppy is doing with Ubuntu's packages. Please ask
> there.
>
> And, by the way, the package that installs the lsb_release python script
> is not lsb, but lsb-release (at least on Ubuntu).
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/lsb/+question/680919/+confirm?answer_id=2
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/lsb/+question/680919
>
> You received this question notification because you asked the question.
>

--
Joe Bill Schirtzinger
Beit Eshel Elder Advisor
http://www.beitesheldonate.org | (270) 681-5728

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#6

I do not know anything about Puppy Linux (and probably all other persons answering questions in the support area for Ubuntu either).
Is the lsb-release package that you have on your system a default package in Puppy Linux, or have you added it?
How does puppy Linux manage package installation, if it is based on Ubuntu, but does not use Ubuntu's package management system? (No need for an answer; this is not relevant for a question in the Ubuntu support area.)

Which link doesn't work for you? http://murga-linux.com/puppy/ works well for me! The problem probably is your e-mail system which apparently has broken the link. Please copy the link from the launchpad page for your question https://answers.launchpad.net/ubuntu/+source/lsb/+question/680919 (but that link probably will also be broken by your e-mail system, please re-type if necessary).

To your final question:
see https://packages.ubuntu.com/bionic/lsb-release
The package lsb-release does not depend on apt, but recommends it.

And some additional information:
Both the lsb-release and apt packages have been developed by Debian and only taken over by Ubuntu (with only minor modifications by Ubuntu).

Revision history for this message
Joe Bill Schirtzinger (jbschirtznger) said :
#7

I'll check this out. I read the lsb-release doc, but because there is an issue, I wanted to hear someone who is actually working or involved with the project say it. (docs can be outdated)

Link works now, thank you.

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

Meanwhile I dug through the scripts of lsb_release, and it seems that you stumbled over a weakness of that package:

My conclusion is, that the OS-version is identified in different ways. First some files (/etc/lsb-release, /etc/dpkg/origins/default, /etc/debian_version, …) are checked, and only if that does not provide the desired information, then apt-cache is used - apparently without checking whether it is available, and not using safeguards like try/except.

If you have an operating system that has neither the information in the files that are checked, nor apt installed, then this script simply does not work on that operating system. The error message shown in such case (e.g. on your Puppy Linux system), however, points into a wrong direction.