Code review comment for lp:~ltrager/flash-kernel/get_machine_deps

Revision history for this message
Scott Moser (smoser) wrote :

So someone would use this by then doing something like:

if flash-kernel --supported; then
   pkgs=$(flash-kernel --get-machine-required-packages) || fail "failed getting required packages"
   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
   get_machine_field "$machine" "$2"
   exit
fi

« Back to merge proposal