lsb_release requires >9MB of Python, replace with C/Shell script

Reported by Paul Sladen on 2010-09-24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lsb (Ubuntu)

Bug Description

Binary package hint: lsb-release

Forwarded from IRC:

  <xxxx> how else am I suppose to work out whether it's Debian or Ubuntu (without installing 9Mb of python so that I can ask lsb_release to parse '/etc/lsb_release' it for me?

Ideally the lsb-release package should be reduced in its dependencies; possibly by replacing the Python script with a simple Shell or C-based program with the same external syntax.

Paul Sladen (sladen) on 2010-09-24
Changed in lsb (Ubuntu):
importance: Undecided → Wishlist

Given that python is installed on every Ubuntu system (it's in the
minimal task), I think it would be more appropriate to file this bug
against the Debian package. For Ubuntu's purposes there's no driving
need to change this.

Wookey (wookey) wrote :

I came up on it in the context of making build chroots. They don't need python installed even on Ubuntu, and nothing causes it to be there until you install lsb-release. And as it has to be unpacked for every build it's good to keep the size/bloat down.

I assume that python is still listed in dependencies in Ubuntu so it will be brought in for packages that need it?

You are right that this is much worse problem on Debian. But for tools that need to work on Debian and Ubuntu (I came across this working on xapt) they need a way to decide which repository layout details to use. lsb-release seems a nice clean way but it's not acceptable on the Debian side if it brings in python. This is actually quite a general problem which affects various tools. A clean and low-overhead method of choosing behaviour would be good.

Another approach is to move anything that changes out into config files so each distro is statically configured, but it seemed nice to make the tools just DTRT so even if run in the wrong place they would work.

Didier Raboud (odyx) wrote :

Wookey: what about using dpkg-vendor instead of lsb-release ? dpkg-vendor is in dpkg-dev and will read data from /etc/dpkg/origins/default and will tell you on which Debian-derivative you are building. Agreed, dpkg-dev is Debian-derivatives-specific, but still...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers