Merge lp:~sil2100/ubuntu-cdimage/pass_build_id into lp:ubuntu-cdimage

Proposed by Łukasz Zemczak
Status: Merged
Merged at revision: 1830
Proposed branch: lp:~sil2100/ubuntu-cdimage/pass_build_id
Merge into: lp:ubuntu-cdimage
Diff against target: 12 lines (+3/-0)
1 file modified
lib/cdimage/livefs.py (+3/-0)
To merge this branch: bzr merge lp:~sil2100/ubuntu-cdimage/pass_build_id
Reviewer Review Type Date Requested Status
Dave Jones (community) Approve
Ubuntu CD Image Team Pending
Review via email: mp+377634@code.launchpad.net

Commit message

Pass the build timestamp to the livefs builder, so it can be used for things like .disk/info.

Description of the change

Pass the build timestamp to the livefs builder, so it can be used for things like .disk/info.

I'm really bad at naming, so if anyone thinks that build_id is *not* the right way to call this parameter, please shout (we'll have to change it in all the various places then). Just seemed to fit as this is how it's *sometimes* called on cdimage.

This way we can have something like .disk/info on our preinstalled images built by ubuntu-image, which would make it much easier for users and testers to identify which image they are using.

This MP is part of a set of changes in ubuntu-image, livecd-rootfs and launchpad-buildd.

To post a comment you must log in.
Revision history for this message
Dave Jones (waveform) wrote :

Looks fine (it did look odd to me, assuming CDIMAGE_DATE is definitely in the config dict, but it seems common throughout the codebase and it is set unconditionally via build_image_set). All tests passing.

I can't think of a better name than build_id either (it could be "build_timestamp" to indicate it's a timestamp, but then that's not the actual intention which is to identify a particular build, regardless of whether it's done via a timestamp or otherwise).

review: Approve
1831. By Łukasz Zemczak

Switch the name to image_build_id

1832. By Łukasz Zemczak

Actually use the already existing datestamp parameter - I've been told by Colin that it was supposed to be used for this purpose exactly.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/cdimage/livefs.py'
2--- lib/cdimage/livefs.py 2019-12-23 10:45:00 +0000
3+++ lib/cdimage/livefs.py 2020-01-16 16:49:34 +0000
4@@ -224,6 +224,9 @@
5
6 metadata_override["channel"] = config["CHANNEL"]
7
8+ if config["CDIMAGE_DATE"]:
9+ metadata_override["datestamp"] = config["CDIMAGE_DATE"]
10+
11 if metadata_override:
12 kwargs["metadata_override"] = metadata_override
13

Subscribers

People subscribed via source and target branches