Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_files.c
diff options
context:
space:
mode:
authorAndrew Fyfe <andrew@neptune-one.net>2007-07-25 22:35:29 +0100
committerDan McGee <dan@archlinux.org>2007-08-16 11:30:38 -0400
commitba67fdae63122b40d8fb4abf9c1c7695999f143d (patch)
treea9dd1ef2aa84e9e60d17efb31f6c6b91af09e746 /lib/libalpm/be_files.c
parentee977019e39fe33a508a60abe4a3ad7eff819b74 (diff)
Remove support for SHA1 from pacman.
There's no need for a second hashing algorithm. MD5 serves the purpose of verifying that a package file hasn't been corrupted during download. Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_files.c')
-rw-r--r--lib/libalpm/be_files.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c
index de0381eb..82430cef 100644
--- a/lib/libalpm/be_files.c
+++ b/lib/libalpm/be_files.c
@@ -361,12 +361,6 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
}
_alpm_strtrim(tmp);
info->isize = atol(tmp);
- } else if(!strcmp(line, "%SHA1SUM%")) {
- /* SHA1SUM tag only appears in sync repositories,
- * not the local one. */
- if(fgets(info->sha1sum, sizeof(info->sha1sum), fp) == NULL) {
- goto error;
- }
} else if(!strcmp(line, "%MD5SUM%")) {
/* MD5SUM tag only appears in sync repositories,
* not the local one. */
@@ -571,10 +565,7 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
fprintf(fp, "%%ISIZE%%\n"
"%lu\n\n", info->isize);
}
- if(info->sha1sum) {
- fprintf(fp, "%%SHA1SUM%%\n"
- "%s\n\n", info->sha1sum);
- } else if(info->md5sum) {
+ if(info->md5sum) {
fprintf(fp, "%%MD5SUM%%\n"
"%s\n\n", info->md5sum);
}