diff options
| author | Michael Vogt <mvo@ubuntu.com> | 2015-05-22 11:03:51 +0200 |
|---|---|---|
| committer | Michael Vogt <mvo@ubuntu.com> | 2015-05-22 11:03:51 +0200 |
| commit | 39e58a1efcf45fa06e9cc87790f5c8883f157039 (patch) | |
| tree | b243b37fe0eb58f721b1eac63010ba405aa27ffc /doc/source | |
| parent | bdbbe156c7aabe231343c909d4bfc5b5ac4c54ce (diff) | |
| download | python-apt-39e58a1efcf45fa06e9cc87790f5c8883f157039.tar.gz | |
apt_pkg.rst: improve documentation for AcquireFile() hash and add sha512 to the documentation
Diffstat (limited to 'doc/source')
| -rw-r--r-- | doc/source/library/apt_pkg.rst | 11 |
1 files changed, 6 insertions, 5 deletions
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 |
