Re: [pacman-dev] [PATCH] Support parallel download with xfercommand

2020-10-31 Thread lesto fante
> ok, so i can implement the tracking of the PID, but before writing any > more code I want to make sure this solution is acceptable; > and if it is, any implementation suggestion is welcome, if not, what > you think is the solution. > > so to recap: > > - solution 1 - > XferCommand called multiple

Re: [pacman-dev] [PATCH] Support parallel download with xfercommand

2020-10-21 Thread lesto fante
> So, you are just passing the full list of files to download to a > download script. Downloads are not managed by pacman at all? Exactly, my understanding is that with XferCommand we delegate an external command to manage the downloads. The advantage of having a dedicated wait command/parameter

Re: [pacman-dev] [PATCH] Support parallel download with xfercommand

2020-10-20 Thread Allan McRae
On 21/10/20 11:54 am, lesto fante wrote: > Hi, > The general idea is to make it possible to have multiple XferCommand > running in parallel. > Rather than trying to keep track of multiple XferCommand, I thought it > would be much easier to let XferCommand to fork/send request to a > daemon and die;

Re: [pacman-dev] [PATCH] Support parallel download with xfercommand

2020-10-20 Thread lesto fante
Hi, The general idea is to make it possible to have multiple XferCommand running in parallel. Rather than trying to keep track of multiple XferCommand, I thought it would be much easier to let XferCommand to fork/send request to a daemon and die; then let pacman call a final script `XferLockCommand

Re: [pacman-dev] [PATCH] Support parallel download with xfercommand

2020-10-20 Thread Allan McRae
On 21/10/20 12:21 am, lesto fante wrote: > The idea here is that if XferLockCommand is set, XferCommand can be > non-blocking; all invocations of XferCommand are executed and only > then XferLockCommand is executed to wait for all the downloads to > complete. > So if you have an update with 150 p

Re: [pacman-dev] [PATCH] Support parallel download with xfercommand

2020-10-20 Thread lesto fante
The idea here is that if XferLockCommand is set, XferCommand can be non-blocking; all invocations of XferCommand are executed and only then XferLockCommand is executed to wait for all the downloads to complete. I am also thinking of changing XferLockCommand to XferWaitCommand, if you have better n

Re: [pacman-dev] [PATCH] Support parallel download with xfercommand

2020-10-19 Thread Eli Schwartz
On 10/19/20 7:19 PM, lesto wrote: > Signed-off-by: lesto > --- > lib/libalpm/alpm.h | 10 ++ > lib/libalpm/dload.c | 9 + > lib/libalpm/handle.c | 13 + > lib/libalpm/handle.h | 1 + > src/pacman/conf.c| 5 - > src/pacman/conf.h

[pacman-dev] [PATCH] Support parallel download with xfercommand

2020-10-19 Thread lesto
Signed-off-by: lesto --- lib/libalpm/alpm.h | 10 ++ lib/libalpm/dload.c | 9 + lib/libalpm/handle.c | 13 + lib/libalpm/handle.h | 1 + src/pacman/conf.c| 5 - src/pacman/conf.h| 1 + src/pacman/pacman-conf.c | 3 +++ 7 file