Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/utils:software-versions into ~ubuntu-docker-images/ubuntu-docker-images/+git/utils:master
Status: | Merged |
---|---|
Merge reported by: | Bryce Harrington |
Merged at revision: | 328e3508aa1d358e0193c61c2f578df556b1d8b3 |
Proposed branch: | ~ubuntu-docker-images/ubuntu-docker-images/+git/utils:software-versions |
Merge into: | ~ubuntu-docker-images/ubuntu-docker-images/+git/utils:master |
Diff against target: |
279 lines (+273/-0) 1 file modified
software-versions.sh (+273/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sergio Durigan Junior | Approve | ||
Canonical Server | Pending | ||
Review via email: mp+401008@code.launchpad.net |
Description of the change
This is not functionally complete yet but is at a good checkpoint to review.
This is a top-down rewrite of my original POC, with commits split up and organized better for review. The implementation focus for this part is determining the Ubuntu archive version information, for both focal and hirsute. (The other part still to come is determining the package version in the corresponding OCI package, but that will be followup.)
The script can be run in one of two ways:
$ software-
$ software-
The first form is the default if no args are provided. Both should provide equivalent data, just displayed differently. The latter is intended for machine consumption so must always generate valid JSON data. There is a json-check script in ubuntu-helpers that can do this verification.
While this only prints out info for hirsute and focal, I am developing it with an eye towards eventually needing to add maybe xenial + bionic + i-series, although I've not tested those yet.
One other possible future change is that currently the list of packages is hardcoded. I hope to maybe move package-specific data into data files, maybe included in the package oci repositories. Thoughts on that would be appreciated. At this point there's just two package-specific bits - the M.N style needed for the source package name, and the identity of the primary binary package installed from the source package.
Thanks for the MP, Bryce.
The very first thing I did was to run shellcheck on the script. I've been trying to keep all of these scripts shellcheck-free (except the "push-images.sh", which is an old script and might not even be needed anymore). Could you fix the shellcheck warnings/notices, please?
Now, about the feature itself: I like it. I think it's a nice addition to our swiss-knife kit. I have a few comments/questions on the code, let me know what you think.