FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 07-17-2011, 05:15 PM
Dave Reisner
 
Default pacman/callback: show .sig suffix on sig download

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
---
src/pacman/callback.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index d34aca1..237ccea 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -604,10 +604,17 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
eta_m = eta_s / 60;
eta_s -= eta_m * 60;

- fname = strdup(filename);
+ /* allocate length+1 (plus null) in case we need to exchange .db for .sig */
+ fname = calloc(1, strlen(filename) + 2);
+ strcpy(fname, filename);
/* strip package or DB extension for cleaner look */
if((p = strstr(fname, ".pkg")) || (p = strstr(fname, ".db"))) {
- *p = '';
+ *p = '';
+
+ /* tack on a .sig suffix for signatures */
+ if((p = strstr(filename, ".sig"))) {
+ strcat(fname, ".sig");
+ }
}
/* In order to deal with characters from all locales, we have to worry
* about wide characters and their column widths. A lot of stuff is
--
1.7.6
 

Thread Tools




All times are GMT. The time now is 02:16 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org