1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 00:08:50 -05:00

Add TotalDownload option.

This will be used in the next commit.

Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Nathan Jones 2007-11-09 19:54:18 -05:00 committed by Dan McGee
parent 3312de65e6
commit b206af78e0
3 changed files with 11 additions and 0 deletions

View File

@ -113,6 +113,11 @@ Options
Download delta files instead of complete packages if possible. Requires Download delta files instead of complete packages if possible. Requires
the xdelta program to be installed. the xdelta program to be installed.
*TotalDownload*::
When downloading, display the amount downloaded, download rate, ETA,
and completed percentage of the entire download list list rather
than the percent of each individual download target. The progress
bar is still based solely on the current file download.
Repository Sections Repository Sections
------------------- -------------------

View File

@ -65,6 +65,9 @@ typedef struct __config_t {
unsigned short chomp; /* I Love Candy! */ unsigned short chomp; /* I Love Candy! */
unsigned short usecolor; /* enable colorful output */ unsigned short usecolor; /* enable colorful output */
unsigned short showsize; /* show individual package sizes */ unsigned short showsize; /* show individual package sizes */
unsigned short totaldownload; /* When downloading, display the amount
downloaded, rate, ETA, and percent
downloaded of the total download list */
} config_t; } config_t;
/* Operations */ /* Operations */

View File

@ -574,6 +574,9 @@ static int _parseconfig(const char *file, const char *givensection,
} else if(strcmp(key, "UseDelta") == 0 || strcmp(upperkey, "USEDELTA") == 0) { } else if(strcmp(key, "UseDelta") == 0 || strcmp(upperkey, "USEDELTA") == 0) {
alpm_option_set_usedelta(1); alpm_option_set_usedelta(1);
pm_printf(PM_LOG_DEBUG, "config: usedelta\n"); pm_printf(PM_LOG_DEBUG, "config: usedelta\n");
} else if(strcmp(key, "TotalDownload") == 0 || strcmp(upperkey, "TOTALDOWNLOAD") == 0) {
config->totaldownload = 1;
pm_printf(PM_LOG_DEBUG, "config: totaldownload\n");
} else { } else {
pm_printf(PM_LOG_ERROR, _("config file %s, line %d: directive '%s' not recognized.\n"), pm_printf(PM_LOG_ERROR, _("config file %s, line %d: directive '%s' not recognized.\n"),
file, linenum, key); file, linenum, key);