diff options
Diffstat (limited to 'src/pacman/callback.c')
-rw-r--r-- | src/pacman/callback.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index c3563af3..ae7e1bed 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -1070,10 +1070,22 @@ static void dload_complete_event(const char *filename, alpm_download_event_compl } } +static int strendswith(const char *haystack, const char *needle) +{ + size_t hlen = strlen(haystack), nlen = strlen(needle); + return hlen >= nlen && strcmp(haystack + hlen - nlen, needle) == 0; +} + /* Callback to handle display of download progress */ void cb_download(void *ctx, const char *filename, alpm_download_event_type_t event, void *data) { (void)ctx; + + /* do not print signature files progress bar */ + if(strendswith(filename, ".sig")) { + return; + } + if(event == ALPM_DOWNLOAD_INIT) { dload_init_event(filename, data); } else if(event == ALPM_DOWNLOAD_PROGRESS) { |