[pacman-dev] Another attempt at fixing sync printing multiple times with --noprogressbar

ivy.foster at gmail.com ivy.foster at gmail.com
Mon Jul 4 01:54:31 UTC 2016

Last month, I sent in a patch[1] trying to fix the issue that when
pacman is run with --noprogressbar, pacman sometimes prints the
message "downloading foo" multiple times. Allan suggested that I fix
the underlying issue; looking at a previous thread[2], I gather that
the issue is that a callback function called multiple times isn't the
correct place to print something just once.

	[1]: https://lists.archlinux.org/pipermail/pacman-dev/2016-June/021149.html
	[2]: https://lists.archlinux.org/pipermail/pacman-dev/2015-May/020094.html

To try and fix it properly, I've sent the following patches:
1) Add new alpm event type for database refresh events
2) Raise database refresh events for refresh start, success and failure
3) Move printing the informational message from the progress callback
   function to the event handler

The main caveat here is that originally, pacman would print "downloading
core.db", but now prints "downloading core". There is no user-visible
change in package downloading.

I tested the changes in valgrind; there are no leaks.

I look forward to your critiques. (-:


More information about the pacman-dev mailing list