Please include installation media build number in installation logs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cdrom-detect (Ubuntu) |
Fix Released
|
Wishlist
|
Colin Watson | ||
installation-report (Ubuntu) |
Fix Released
|
Wishlist
|
Evan | ||
ubiquity (Ubuntu) |
Fix Released
|
Wishlist
|
Evan |
Bug Description
Binary package hint: ubiquity
It would be useful to be able to identify, for a given Ubuntu installation, which version of the installation media it was installed from. I'd like to be able to access this from apport hooks, so that it can be included in bug reports. This will help distinguish between, for example, a system which has been upgraded over many releases and one which is a fresh install.
ProblemType: Bug
Architecture: amd64
Dependencies:
DistroRelease: Ubuntu 9.04
Package: ubiquity None [modified: /var/lib/
ProcEnviron:
LC_COLLATE=C
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/zsh
SourcePackage: ubiquity
Uname: Linux 2.6.28-11-generic x86_64
UnreportableReason: This is not a genuine Ubuntu package
Changed in installation-report (Ubuntu): | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
Changed in ubiquity (Ubuntu): | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
Changed in installation-report (Ubuntu): | |
assignee: | nobody → Evan Dandrea (evand) |
Changed in ubiquity (Ubuntu): | |
assignee: | nobody → Evan Dandrea (evand) |
Changed in installation-report (Ubuntu): | |
status: | Fix Released → Triaged |
status: | Triaged → Fix Released |
Changed in cdrom-detect (Ubuntu): | |
assignee: | nobody → Colin Watson (cjwatson) |
Changed in cdrom-detect (Ubuntu): | |
importance: | Undecided → Wishlist |
status: | New → Fix Committed |
For desktop installations, which are probably the most common, I have found the following code useful to extract the disk information from the casper.log:
# Found label 'Ubuntu 8.04.1 _Hardy Heron_ - Release amd64 (20080702.1)'
distributor_ regex = r"(?P<distribut or>[\w\ -]+)"
release_ regex = r"(?P<release> [\d\.]+ )"
codename_ regex = r"(?P<codename> [^_]+)"
official_ regex = r"(?P<official>[\w ]+)"
architecture_ regex = r"(?P<architect ure>[\w\ +]+)" Binary- \d+)"
type_regex = r"(?P<type>
date_regex = r"(?P<date>[^\)]+)"
info_regex = r"%s %s _%s_ - %s %s (%s )?\(%s\)" % (distributor_regex,
release_ regex, codename_regex, official_regex, architecture_regex,
type_ regex, date_regex)
line_pattern = re.compile( line_regex)
line_regex = r"Found label '%s'" % info_regex
file = open("/ var/log/ installer/ casper. log") match(line)
print match.group( "codename" )
for line in file.readlines():
match = line_pattern.
if match: