mirror of
https://git.centos.org/centos/centpkg.git
synced 2025-02-24 00:32:55 +00:00
set the correct lookaside hash type
This commit is contained in:
parent
046d91324c
commit
3d42683a55
1 changed files with 12 additions and 0 deletions
|
@ -141,6 +141,18 @@ class Commands(pyrpkg.Commands):
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise pyrpkg.rpkgError('Malformed sources file.')
|
raise pyrpkg.rpkgError('Malformed sources file.')
|
||||||
|
|
||||||
|
# The default lookaside hash is stored in centpkg.conf, but there is
|
||||||
|
# a mix of md5 and sha sums in the CentOS lookaside, here we divine
|
||||||
|
# which one we are using
|
||||||
|
|
||||||
|
sum_lengths = { 128: 'sha512',
|
||||||
|
64: 'sha256',
|
||||||
|
40: 'sha1',
|
||||||
|
32: 'md5',
|
||||||
|
}
|
||||||
|
|
||||||
|
self.lookasidehash = sum_lengths[len(csum)]
|
||||||
|
|
||||||
# If a directory is specified in the metadata file, append it to
|
# If a directory is specified in the metadata file, append it to
|
||||||
# outdir
|
# outdir
|
||||||
if os.path.dirname(file):
|
if os.path.dirname(file):
|
||||||
|
|
Loading…
Add table
Reference in a new issue