[pacman-dev] [PATCH] Normalize alpm download callback's frontend cb arguments

Allan McRae allan at archlinux.org
Sun Aug 7 04:44:40 UTC 2016


On 09/07/16 13:11, ivy.foster at gmail.com wrote:
> From: Ivy Foster <ivy.foster at gmail.com>
> 
> When curl calls alpm's dlcb, alpm calls the frontend's cb with the
> following (dlsize, totalsize) arguments:
> 
> 0, -1: initialize
> 0, 0: no change since last call
> x {x>0, x<y}, y {y>0}: data downloaded, total size known
> x {x>0}, x: download finished
> 
> If total size is not known, do not call frontend cb (no change to
> original behavior); alpm's callback shouldn't be called if there is a
> download error.
> 
> See agregory's original spec here:
> https://wiki.archlinux.org/index.php/User:Apg#download_callback

Implementing the full idea from Andrew is probably still worthwhile. But
this gets the main parts done and is an improvement so I am accepting.

Thanks,
Allan


More information about the pacman-dev mailing list