aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2009-04-29 02:44:12 +0000
committerJason Woodward2009-04-29 02:44:12 +0000
commite03a2f82c9091f968acefb3737ab1b0827bd8de7 (patch)
tree41c0bd418b0f4680ac0f4a4a2a1c225ec88f879d
parentd7b4dcd1a46989019499bf335e56d0b90ae8634b (diff)
downloadslapt-get-e03a2f82c9091f968acefb3737ab1b0827bd8de7.tar.gz
disabled file size check since slack PACKAGES.TXT sizes are no longer accurate byte counts
-rw-r--r--ChangeLog2
-rw-r--r--src/package.c12
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f3fcbd4..780eb49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
0.10.1a Apr 27, 2009
+ * disabled file size check since slack PACKAGES.TXT sizes
+ are no longer accurate byte counts
* added support for txz package extension
* updated de translation from Manfred Mueller
* updated pt_BR translation from Sergio Surkamp
diff --git a/src/package.c b/src/package.c
index 044a0b3..5ebe3a2 100644
--- a/src/package.c
+++ b/src/package.c
@@ -2241,17 +2241,25 @@ slapt_code_t slapt_verify_downloaded_pkg(const slapt_rc_config *global_config,
{
char *file_name = NULL;
FILE *fh_test = NULL;
- size_t file_size = 0;
char md5sum_f[SLAPT_MD5_STR_LEN];
/*
+ size_t file_size = 0;
check the file size first so we don't run an md5 checksum
on an incomplete file
- */
+
+ XXX 2009-04-27 XXX
+ This has become increasingly less reliable, especially with
+ recent changes in how the size is calculated when generating
+ the PACKAGES.TXT... we do not really lose a lot by not checking
+ since we are validating the checksum anyway.
+
file_size = slapt_get_pkg_file_size(global_config,pkg);
if ((unsigned int)(file_size/1024) != pkg->size_c) {
return SLAPT_DOWNLOAD_INCOMPLETE;
}
+ */
+
/* if not checking the md5 checksum and the sizes match, assume its good */
if (global_config->no_md5_check == SLAPT_TRUE)
return SLAPT_OK;