Commit Graph

10 Commits

Author SHA1 Message Date
Dan McGee a36ff9404b Bump copyright dates to 2010
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-14 19:46:59 -05:00
Dan McGee c72b4543b6 Update copyright headers and messages
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-01 02:08:33 -05:00
Dan McGee fe781e4ce4 Reimplement TotalDownload functionality
Add a new totaldlcb callback function to libalpm and make pacman utilize it
when the TotalDownload option is enabled. This callback function is pretty
simple- it is meant to be called once at the beginning of a "list download"
action, and once at the end (with value 0 to indicate the list has been
finished). The frontend is responsible for keeping track of adding
individual file download amounts to the total xfered amount in order to
display some sort of overall progress.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-04 15:38:53 -05:00
Dan McGee 0669c9bfac Use correct C type for file sizes
We have been using unsigned long as a file size type for a while, which
works but isn't quite correct and could easily break. Worse was probably our
use of int in the download callback functions, which could be restrictive
for packages > 2GB in size.

Switch all file size variables to use off_t, which is the preferred type for
file sizes. Note that at least on Linux, all applications compiled against
libalpm must now be sure to use large file support, where _FILE_OFFSET_BITS
is defined to be 64 or there will be some weird issues that crop up.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-04 15:38:47 -05:00
Dan McGee c2dbbd60bc Start removing some junk from the function template
I screwed up originally when I accepted the TotalDownload patch,
8ec27835f4. I didn't realize how deeply it
modified libalpm and I probably shouldn't have let it do what it did. This
commit reverts much of what that patch added in order to clean up our
internal function calls. We can find another way to do it right down the
road here but for now it has to go.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-27 18:58:24 -06:00
Dan McGee 9781d0d637 Update GNU GPL boilerplate and copyright dates
Update the GPL boilerplate to direct people to the GNU website for a copy of
the license, as well as bump all of Judd's copyrights to 2007.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10 22:55:39 -06:00
Nathan Jones 8ec27835f4 Implement TotalDownload option.
Setting this option will change the download progress to show the amount
downloaded, download rate, ETA, and download percent of the entire
download list rather than per each individual file.

The progress bar is still based on the completion of the current file
regardless if the TotalDownload option is set.

This closes FS#7205.

Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-11 09:46:13 -06:00
Dan McGee a32ca90192 Remove logmask stuff from backend; switch logging callback to new pm_printf
Remove the logmask functionality from the backend as it has been moved to
the frontend, and change the logging callback function to use pm_printf.

In addition, make much better use of va_list- use the args list instead
of a arbitrarily chosen string to print to in the logging functions.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09 12:57:50 -04:00
Dan McGee 6a1dfdf292 Set the correct type on the log callback function
Somehow missed this earlier when changing everything to types.
unsigned short -> pmloglevel_t wherever necessary.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26 18:59:02 -04:00
Dan McGee dc05cd107c Pacman side code consolidation- unify callback functions to one file
Some more major code reorginization here. The download progress callback
function has been renamed and moved to callback.c, which is the former
trans.c with the download and log callbacks added. In addition, this allows
util.c to be cleaned up as fill_progress can now be static in callback.c.
We've also cut two more source files out.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26 14:34:41 -04:00