pkg icon indicating copy to clipboard operation
pkg copied to clipboard

Fetching multiple packages in parallel

Open bmin opened this issue 4 years ago • 3 comments

I am playing with libpng - performing various pkg management tasks using it.

While fetching packages, I want to get notified to show the progress in percent(%). It works fine if I register an event using pkg_event_register and fetching one single package, but not for the parallel fetching when I go for fetching multiple packages.

I have had a look into the source of pkg_event_register, seems like the way I am proceeding will not help me now.

While exploring the code, pkg_emit_event (pkg_event.c ) seems to be a way ( maybe a workaround or a bad way for the time being ) to go if I can register a plugin on the fly for each fetching operation and hook with for PKG_PLUGIN_HOOK_EVENT. Or do you have any plan to allow registering multiple callbacks for an event and pushing the event to all the registered callbacks as you do for the plugins?

Could someone of you put some light on this regards? Maybe I am thinking totally wrong, there is an easy way to achieve it.

Thanking you in advance.

bmin avatar Jun 18 '21 00:06 bmin

Cross-references:

… setting up multiple connections to the server may be better for you, but has the potential to hurt others using that resource. …

grahamperrin avatar Mar 04 '22 06:03 grahamperrin

just tying to install gnome desktop related packages. network connection is good but still downloading sequentially takes forever

d9j avatar Aug 27 '23 07:08 d9j

Parallel downloads should be a feature of pkg, as in any modern package manager :)

chrislongros avatar Jan 07 '24 21:01 chrislongros