On Jul 15, 2016, at 12:51 PM, Michał Sawicz wrote: >system-image-cli always goes to the latest, there's no way to override >that atm.
Kind of. As I mentioned earlier, there is the -m/--maximage flag. Let me elaborate on that a little bit. The way s-i works is that it first calculates all the candidate update paths that the server is offering, from the image number the device is currently on, to the highest image number in the specified device/channel. Each of these three bits can be changed via the command line: -b - the image number the device thinks it's on -c - the device's channel -d - the device's device name You can see all the candidate paths in the log file or console when you use --dry-run and -v. s-i then applies a scoring algorithm to each of the candidate upgrade paths. For each extra reboot in the upgrade, the path gets +100 (there's always an implicit reboot at the end, which is not counted). 1 point is added for every MiB over the size of the path with the smallest total download. +9000 is added for the total distance of that path's end point image from the highest version number available. All of this strongly weights the winning path to the smallest delta that leaves you at the highest available version number with the fewest number of reboots, but other factors can come into play, and the verbose log will display the sorted candidate paths along with their scores, from highest score to lowest. The candidate path with the lowest score wins. Now let's say the device is at image 59, the highest image is 71, and the winning path is [61:62:68:70:71]. Normally, the device would download these deltas and arrange for them to be applied in order on reboot. However, before it downloads these images, s-i filters the winning path based on the --maximage value. Let's say you run s-i with --maximage=69; what will actually get downloaded and applied are images [61:62:68]. IOW, every image greater than the --maximage is ignored, but only *after* the winning path is calculate. Cheers, -Barry
pgp_nLr2EjmMH.pgp
Description: OpenPGP digital signature
-- Mailing list: https://launchpad.net/~ubuntu-phone Post to : [email protected] Unsubscribe : https://launchpad.net/~ubuntu-phone More help : https://help.launchpad.net/ListHelp

