Merge lp://staging/~ltrager/flash-kernel/get_machine_deps into lp://staging/flash-kernel
Status: | Needs review |
---|---|
Proposed branch: | lp://staging/~ltrager/flash-kernel/get_machine_deps |
Merge into: | lp://staging/flash-kernel |
Diff against target: |
15 lines (+5/-0) 1 file modified
functions (+5/-0) |
To merge this branch: | bzr merge lp://staging/~ltrager/flash-kernel/get_machine_deps |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Installer Team | Pending | ||
Review via email: mp+311210@code.staging.launchpad.net |
Commit message
Add --get-machine-
Description of the change
In lp:~ltrager/curtin/lp1640519 I needed to modify curtin to install the required machine dependencies so flash-kernel successfully runs. There wasn't a straight forward way to do this so I ended up writing my own script which sources the flash-kernel functions and retrieves the 'Required-Packages' field. This adds a command line option to do just that.
Unmerged revisions
- 995. By Lee Trager
-
Always exit 0 when using --get-machine-field
- 994. By Lee Trager
-
* Add generic --get-machine-field
* Remove check_supported, get_machien_field will return 0 if the machine isn't support - 993. By Lee Trager
-
Add --get-machine-
required- packages to show the required packages needed to run.
So someone would use this by then doing something like:
if flash-kernel --supported; then $(flash- kernel --get-machine- required- packages) || fail "failed getting required packages"
pkgs=
apt-get install -qy $pkgs
fi
right ? I'm not sure that the 'check_supported' usage in your addition helps at all, because the user of this somehow has to determine the difference between failure due to "not supported" or other failure. So they end up having to do the above, right?
One thing i might suggest is just changing it to be more generic and allow getting of any field.
if [ "$1" = "--get- machine- field" ]; then machine_ field "$machine" "$2"
get_
exit
fi