From 39e58a1efcf45fa06e9cc87790f5c8883f157039 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 22 May 2015 11:03:51 +0200 Subject: apt_pkg.rst: improve documentation for AcquireFile() hash and add sha512 to the documentation --- doc/source/library/apt_pkg.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'doc/source') diff --git a/doc/source/library/apt_pkg.rst b/doc/source/library/apt_pkg.rst index c5e58b38..8faca4a4 100644 --- a/doc/source/library/apt_pkg.rst +++ b/doc/source/library/apt_pkg.rst @@ -1704,7 +1704,7 @@ installation. There was a network error. -.. class:: AcquireFile(owner, uri[, md5, size, descr, short_descr, destdir, destfile]) +.. class:: AcquireFile(owner, uri[, hash, size, descr, short_descr, destdir, destfile]) Create a new :class:`AcquireFile()` object and register it with *acquire*, so it will be fetched. You must always keep around a reference to the @@ -1717,8 +1717,9 @@ installation. The parameter *uri* refers to the location of the file, any protocol of apt is supported. - The parameter *md5* refers to the md5sum of the file. This can be used - for checking the file. + The parameter *hash* refers to the hash of the file. If this is set + libapt will check the file after downloading. See :class:`HashString` + for the combined form string format description. The parameter *size* can be used to specify the size of the package, which can then be used to calculate the progress and validate the download. @@ -1850,8 +1851,8 @@ generic hash support: .. attribute:: hashtype - The type of the hash, as a string. This may be "MD5Sum", "SHA1" - or "SHA256". + The type of the hash, as a string. This may be "MD5Sum", "SHA1", + "SHA256" or "SHA512". .. method:: verify_file(filename: str) -> bool -- cgit v1.2.3