• P
    implement sensible handling of checksum fields in .changes and .dsc · aaa9ef21
    Philipp Kern 提交于
    2008-08-28  Philipp Kern  <pkern@debian.org>
    
    	* daklib/utils.py (check_hashes): adapt to different API, check
    	sizes separately
    
    	* daklib/utils.py (parse_changes, parse_deb822): refactor
    	the string-based logic of parse_changes into a new function
    	parse_deb822; parse_changes itself remains file-based
    
    	* daklib/utils.py (hash_key): gives the key of a hash in the
    	files dict
    
    	* daklib/utils.py (create_hash, check_size): made more readable
    
    	* daklib/utils.py (check_hash): just check the hashes and complain
    	about missing checksums
    
    	* daklib/utils.py (check_hash_fields): function to reject unknown
    	checksums fields
    
    	* daklib/utils.py (_ensure_changes_hash, _ensure_dsc_hash): helper
    	functions for ensure_hashes; check their corresponding manifests'
    	hashes
    
    	* daklib/utils.py (ensure_hashes): retrieve the checksums fields
    	from the original filecontents blob so that they do not need to
    	be present in the .dak; refactored the actual checks by calling
    	the aforementioned helper functions
    
    	* daklib/utils.py (parse_checksums): parse a given checksums field
    	in a manifest and insert the values found into the files dict,
    	checking the file sizes on the way
    aaa9ef21
utils.py 45.4 KB