summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2008-12-14 00:41:17 +0000
committerJason Woodward2008-12-14 00:41:17 +0000
commitfcd4b73aaba68ac0157b707987cae6dfd3318174 (patch)
tree0b6935e211917949bed119de5e11072a177e9733
parent501e081f4945a706fcb798ad28a7ec83f3ed3d18 (diff)
downloadgslapt-fcd4b73aaba68ac0157b707987cae6dfd3318174.tar.gz
use the actual file extension when printing the package name while downloading
-rw-r--r--ChangeLog1
-rw-r--r--src/callbacks.c18
2 files changed, 11 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 40eaae4..ff24111 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
0.5.1 Dec 13, 2008
+ * use the actual file extension when printing the package name while downloading
* fixed the show upgradeable view to account for package priorities
0.5.0 Dec 07, 2008
diff --git a/src/callbacks.c b/src/callbacks.c
index b2dade4..2d8d32b 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -1992,7 +1992,7 @@ char *download_packages (void)
guint msg_len = strlen(trans->install_pkgs->pkgs[i]->name)
+ strlen("-") + strlen(trans->install_pkgs->pkgs[i]->version)
- + strlen(".") + strlen(".tgz");
+ + strlen(".") + strlen(trans->install_pkgs->pkgs[i]->file_ext);
gchar *msg = slapt_malloc(msg_len * sizeof *msg);
gchar dl_size[20];
@@ -2000,10 +2000,11 @@ char *download_packages (void)
strlen(trans->install_pkgs->pkgs[i]->name)
+ strlen("-")
+ strlen(trans->install_pkgs->pkgs[i]->version)
- + strlen(".") + strlen(".tgz"),
- "%s-%s.tgz",
+ + strlen(".") + strlen(trans->install_pkgs->pkgs[i]->file_ext),
+ "%s-%s%s",
trans->install_pkgs->pkgs[i]->name,
- trans->install_pkgs->pkgs[i]->version
+ trans->install_pkgs->pkgs[i]->version,
+ trans->install_pkgs->pkgs[i]->file_ext
);
sprintf(dl_size,"%d K",trans->install_pkgs->pkgs[i]->size_c);
@@ -2041,7 +2042,7 @@ char *download_packages (void)
guint msg_len = strlen(trans->upgrade_pkgs->pkgs[i]->upgrade->name)
+ strlen("-") + strlen(trans->upgrade_pkgs->pkgs[i]->upgrade->version)
- + strlen(".") + strlen(".tgz");
+ + strlen(".") + strlen(trans->upgrade_pkgs->pkgs[i]->upgrade->file_ext);
gchar *msg = slapt_malloc( sizeof *msg * msg_len);
gchar dl_size[20];
@@ -2049,10 +2050,11 @@ char *download_packages (void)
strlen(trans->upgrade_pkgs->pkgs[i]->upgrade->name)
+ strlen("-")
+ strlen(trans->upgrade_pkgs->pkgs[i]->upgrade->version)
- + strlen(".") + strlen(".tgz"),
- "%s-%s.tgz",
+ + strlen(".") + strlen(trans->upgrade_pkgs->pkgs[i]->upgrade->file_ext),
+ "%s-%s%s",
trans->upgrade_pkgs->pkgs[i]->upgrade->name,
- trans->upgrade_pkgs->pkgs[i]->upgrade->version
+ trans->upgrade_pkgs->pkgs[i]->upgrade->version,
+ trans->upgrade_pkgs->pkgs[i]->upgrade->file_ext
);
sprintf(dl_size,"%d K",trans->upgrade_pkgs->pkgs[i]->upgrade->size_c);