pkg
                                
                                
                                
                                    pkg copied to clipboard
                            
                            
                            
                        Fetching multiple packages in parallel
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.
Cross-references:
… setting up multiple connections to the server may be better for you, but has the potential to hurt others using that resource. …
just tying to install gnome desktop related packages. network connection is good but still downloading sequentially takes forever
Parallel downloads should be a feature of pkg, as in any modern package manager :)