[Bug 310915] Re: global name 'unknown' is not defined
Hardy has seen the end of its life and is no longer receiving any updates. Marking the Hardy task for this ticket as Won't Fix. ** Changed in: lsb (Ubuntu Hardy) Status: Triaged = Won't Fix -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/310915 Title: global name 'unknown' is not defined To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lsb/+bug/310915/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 310915] Re: global name 'unknown' is not defined
I came across this issue upgrading a Turnkey Linux box running on VMWare from Ubuntu 8.04.3 LTS (Hardy) to 10.04 LTS (Lucid). Use case: 1. Innitially /usr/bin/lsb_release is missing (/etc/lsb-release is not missing): # lsb_release -bash: lsb_release: command not found 2. Follow 'Network Upgrade for Ubuntu Servers' steps from https://help.ubuntu.com/community/LucidUpgrades # sudo apt-get update # sudo apt-get upgrade # sudo apt-get install update-manager-core 3. Attempt: # sudo do-release-upgrade Checking for a new ubuntu release Traceback (most recent call last): File /usr/bin/lsb_release, line 340, in module main() File /usr/bin/lsb_release, line 304, in main distinfo = get_distro_information() File /usr/bin/lsb_release, line 267, in get_distro_information distinfo = guess_debian_release() File /usr/bin/lsb_release, line 226, in guess_debian_release rinfo = guess_release_from_apt() File /usr/bin/lsb_release, line 182, in guess_release_from_apt version = RELEASE_CODENAME_LOOKUP.get(unknown, rinfo.get('suite','')) NameError: global name 'unknown' is not defined lsb_release returned exitcode: 1 current dist not found in meta-release file No new release found 4. Also attempt: # lsb_release Traceback (most recent call last): File /usr/bin/lsb_release, line 340, in module main() File /usr/bin/lsb_release, line 304, in main distinfo = get_distro_information() File /usr/bin/lsb_release, line 267, in get_distro_information distinfo = guess_debian_release() File /usr/bin/lsb_release, line 226, in guess_debian_release rinfo = guess_release_from_apt() File /usr/bin/lsb_release, line 182, in guess_release_from_apt version = RELEASE_CODENAME_LOOKUP.get(unknown, rinfo.get('suite','')) NameError: global name 'unknown' is not defined 5. As in 1st Bug description post above, edit /usr/bin/lsb_release by adding quotes around 'unknown' in 2 places here: # Finally, find the highest numeric value highestrelease = 0 for (pri, rinfo) in releases: if rinfo.get('suite', '') not in ignoresuites: version = RELEASE_CODENAME_LOOKUP.get(unknown, rinfo.get('sui te','')) if version highestrelease: highestrelease = version # And return it for (pri, rinfo) in releases: if rinfo.get('suite', '') not in ignoresuites: version = RELEASE_CODENAME_LOOKUP.get(unknown, rinfo.get('sui te','')) 6. Successfully attempt: # sudo do-release-upgrade Upgrade to Lucid proceeds smoothly. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/310915 Title: global name 'unknown' is not defined -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 310915] Re: global name 'unknown' is not defined
Sorry, I can barly remember which skript failed there. Next time I report a bug I try to include that info. -- global name 'unknown' is not defined https://bugs.launchpad.net/bugs/310915 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 310915] Re: global name 'unknown' is not defined
Jens, do you have a test case for this? I can confirm that there's a bug in the code, but I'm entirely unable to trigger a failure in lsb_release as a result of it; even if I remove all of /etc/apt/sources.list, /etc/debian_version, and /etc/lsb-release, lsb_release -a still succeeds (though obviously returns questionable values). Without a use case that's actually broken by this incorrect code, I'm dropping the milestone of 8.04.4. ** Changed in: lsb (Ubuntu Hardy) Milestone: ubuntu-8.04.4 = None -- global name 'unknown' is not defined https://bugs.launchpad.net/bugs/310915 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 310915] Re: global name 'unknown' is not defined
This is indeed a valid bug in 8.04 (still present in lsb 4.0-0ubuntu0.8.04.1), but seems to have been fixed in more recent versions - Karmic doesn't have this bug. ** Also affects: lsb (Ubuntu Hardy) Importance: Undecided Status: New ** Changed in: lsb (Ubuntu) Status: New = Fix Released ** Changed in: lsb (Ubuntu Hardy) Status: New = Triaged ** Changed in: lsb (Ubuntu Hardy) Importance: Undecided = Medium ** Changed in: lsb (Ubuntu Hardy) Milestone: None = ubuntu-8.04.4 -- global name 'unknown' is not defined https://bugs.launchpad.net/bugs/310915 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs