diff options
author | Nathan Jones <nathanj@insightbb.com> | 2007-10-19 13:17:53 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-10-19 19:29:17 -0500 |
commit | e472e80c084c5e94fdc15d2f6565c50e65854372 (patch) | |
tree | cf19a2493d81696f04469385a837b9a7a739733b /src/pacman | |
parent | 520db578daf4dfe4863f9c32026460ada9131b78 (diff) |
Download delta files if UseDelta is set.
Delta files will be used if the size is smaller than a percent
(MAX_DELTA_RATIO) of the package size.
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman')
-rw-r--r-- | src/pacman/callback.c | 23 | ||||
-rw-r--r-- | src/pacman/pacman.c | 3 |
2 files changed, 25 insertions, 1 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 6d257133..aec9753a 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -236,6 +236,27 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2) case PM_TRANS_EVT_INTEGRITY_DONE: printf(_("done.\n")); break; + case PM_TRANS_EVT_DELTA_INTEGRITY_START: + printf(_("checking delta integrity... ")); + break; + case PM_TRANS_EVT_DELTA_INTEGRITY_DONE: + printf(_("done.\n")); + break; + case PM_TRANS_EVT_DELTA_PATCHES_START: + printf(_("applying deltas...\n")); + break; + case PM_TRANS_EVT_DELTA_PATCHES_DONE: + /* nothing */ + break; + case PM_TRANS_EVT_DELTA_PATCH_START: + printf(_("generating %s with %s... "), (char *)data1, (char *)data2); + break; + case PM_TRANS_EVT_DELTA_PATCH_DONE: + printf(_("done.\n")); + break; + case PM_TRANS_EVT_DELTA_PATCH_FAILED: + printf(_("failed.\n")); + break; case PM_TRANS_EVT_PRINTURI: printf("%s/%s\n", (char*)data1, (char*)data2); break; @@ -309,7 +330,7 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2, break; case PM_TRANS_CONV_CORRUPTED_PKG: if(!config->noconfirm) { - snprintf(str, LOG_STR_LEN, _(":: Archive %s is corrupted. Do you want to delete it? [Y/n] "), + snprintf(str, LOG_STR_LEN, _(":: File %s is corrupted. Do you want to delete it? [Y/n] "), (char *)data1); *response = yesno(str); } else { diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 8474020f..2f6f9280 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -548,6 +548,9 @@ static int _parseconfig(const char *file, const char *givensection, } else if(strcmp(key, "ShowSize") == 0 || strcmp(upperkey, "SHOWSIZE") == 0) { config->showsize = 1; pm_printf(PM_LOG_DEBUG, "config: showsize\n"); + } else if(strcmp(key, "UseDelta") == 0 || strcmp(upperkey, "USEDELTA") == 0) { + alpm_option_set_usedelta(1); + pm_printf(PM_LOG_DEBUG, "config: usedelta\n"); } else { pm_printf(PM_LOG_ERROR, _("config file %s, line %d: directive '%s' not recognized.\n"), file, linenum, key); |