Merge lp://staging/~elementary-os/ubuntu/utopic/lsb/upstream-information into lp://staging/ubuntu/utopic/lsb

Proposed by Sergey "Shnatsel" Davidoff
Status: Rejected
Rejected by: Colin Watson
Proposed branch: lp://staging/~elementary-os/ubuntu/utopic/lsb/upstream-information
Merge into: lp://staging/ubuntu/utopic/lsb
Diff against target: 128 lines (+25/-14)
3 files modified
lsb_release (+5/-2)
lsb_release.1 (+6/-1)
lsb_release.py (+14/-11)
To merge this branch: bzr merge lp://staging/~elementary-os/ubuntu/utopic/lsb/upstream-information
Reviewer Review Type Date Requested Status
Colin Watson (community) Disapprove
Review via email: mp+231704@code.staging.launchpad.net

Description of the change

Add "-u, --upstream" key to lsb_release command and "Upstream=True/False" named parameter to the relevant Python module, to allow querying Ubuntu information in distributions derived from it.
This greatly simplifies release version/codename handling in derived distros for third parties.

This patch originates from JoliCloud (https://github.com/jolicloud/lsb/commit/fde07bfec0935784e5caa6cd6a2ff5f81c3d0ad4) and has been adopted in elementary OS and a development version of Linux Mint. I'm proposing it for merging into the Ubuntu package so that all Ubuntu derivatives could get it automatically, without the need to carry patches by themselves.

Depends on https://code.launchpad.net/~elementary-os/ubuntu/utopic/base-files/upstream-release-info/+merge/231703 to provide the /etc/upstream-release/lsb-release file

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :

To me it sounds like something which should be implemented upstream. Do you think you can file a bug here? https://lsbbugs.linuxfoundation.org/enter_bug.cgi

Judging from https://lsbbugs.linuxfoundation.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=&content=lsb_release you could file the bug on Product: Specification - Component: Core-generic.

Revision history for this message
Colin Watson (cjwatson) wrote :

I agree - I think it is a mistake to implement this kind of thing as an extension. At the very least if it's going to be done at a distribution-specific level it needs to be in Debian, as otherwise we may well have problems later; imagine for instance that Debian decides to implement a useful -u option for something else and lots of packages adopt it. But it would be much better upstream.

There is also the question of multiple levels of derivation, which your patch does not appear to address at all; an Ubuntu derivative would not be able to access Debian information here. I would suggest comparing with the much better design in dpkg-vendor. I'm sure that upstream and/or Debian could help in coming up with a good extensible design for this sort of thing.

review: Disapprove

Unmerged revisions

91. By Sergey "Shnatsel" Davidoff

document -u, --upstream in the manpage

90. By Sergey "Shnatsel" Davidoff

Applied JoliCloud patch adding '-u, --upstream to' the lsb_release command and 'Upstream=True to Python module' that read /etc/upstream-release/lsb-release instead of /etc/lsb-release

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches