commit: 8fb65220f1c65593f82ea7fbffdd523f0b235334 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Mon Nov 6 07:12:31 2017 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Mon Nov 6 14:33:01 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8fb65220
Remove last traces of Manifest1 code Reviewed-by: Zac Medico <zmedico <AT> gentoo.org> pym/portage/const.py | 1 - pym/portage/manifest.py | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pym/portage/const.py b/pym/portage/const.py index 98b7c88c9..0af57d0e2 100644 --- a/pym/portage/const.py +++ b/pym/portage/const.py @@ -205,7 +205,6 @@ SUPPORTED_FEATURES = frozenset([ EAPI = 6 HASHING_BLOCKSIZE = 32768 -MANIFEST1_HASH_FUNCTIONS = ("MD5", "SHA256", "RMD160") MANIFEST2_HASH_DEFAULTS = frozenset(["SHA256", "SHA512", "WHIRLPOOL"]) MANIFEST2_REQUIRED_HASH = "SHA512" diff --git a/pym/portage/manifest.py b/pym/portage/manifest.py index 0a68aa653..36c82690c 100644 --- a/pym/portage/manifest.py +++ b/pym/portage/manifest.py @@ -26,7 +26,7 @@ from portage import _unicode_encode from portage.exception import DigestException, FileNotFound, \ InvalidDataType, MissingParameter, PermissionDenied, \ PortageException, PortagePackageException -from portage.const import (MANIFEST1_HASH_FUNCTIONS, MANIFEST2_HASH_DEFAULTS, +from portage.const import (MANIFEST2_HASH_DEFAULTS, MANIFEST2_IDENTIFIERS, MANIFEST2_REQUIRED_HASH) from portage.localization import _ @@ -710,10 +710,7 @@ class Manifest(object): myfile.close() for l in lines: mysplit = l.split() - if len(mysplit) == 4 and mysplit[0] in MANIFEST1_HASH_FUNCTIONS \ - and 1 not in rVal: - rVal.append(1) - elif len(mysplit) > 4 and mysplit[0] in MANIFEST2_IDENTIFIERS \ + if len(mysplit) > 4 and mysplit[0] in MANIFEST2_IDENTIFIERS \ and ((len(mysplit) - 3) % 2) == 0 and not 2 in rVal: rVal.append(2) return rVal