Permalink
Browse files

- revert repo_lookup_checksum change, the ids should always be stored…

… as checksums
  • Loading branch information...
mlschroe committed Jun 27, 2012
1 parent 521f1f5 commit 57aeac522be3a8f30b7a3ec7b49f7d92d9ab22e5
Showing with 0 additions and 22 deletions.
  1. +0 −22 src/repo.c
View
@@ -1289,28 +1289,6 @@ const char *
repo_lookup_checksum(Repo *repo, Id entry, Id keyname, Id *typep)
{
const unsigned char *chk = repo_lookup_bin_checksum(repo, entry, keyname, typep);
- if (!chk && (keyname == SOLVABLE_PKGID || keyname == SOLVABLE_HDRID || keyname == SOLVABLE_LEADSIGID))
- {
- const char *s = repo_lookup_str(repo, entry, keyname);
- if (!s)
- return 0;
- if (strlen(s) == 32)
- {
- *typep = REPOKEY_TYPE_MD5;
- return s;
- }
- if (strlen(s) == 40)
- {
- *typep = REPOKEY_TYPE_SHA1;
- return s;
- }
- if (strlen(s) == 64)
- {
- *typep = REPOKEY_TYPE_SHA256;
- return s;
- }
- return 0;
- }
return chk ? pool_bin2hex(repo->pool, chk, solv_chksum_len(*typep)) : 0;
}

0 comments on commit 57aeac5

Please sign in to comment.