Commit 9205c0f2 authored by Julian Andres Klode's avatar Julian Andres Klode

Document apt_pkg.SourceRecordsFile

parent a2eba398
......@@ -1435,7 +1435,6 @@ Records (Release files, Packages, Sources)
section = apt_pkg.TagSection(records.record)
print(section['SHA256']) # Use records.sha256_hash instead
.. class:: SourceRecords
Provide an easy way to look up the records of source packages and
......@@ -1486,11 +1485,12 @@ Records (Release files, Packages, Sources)
.. attribute:: files
The list of files. This returns a list of tuples with the contents
``(str: md5, int: size, str: path, str:type)``, where
'type' can be 'diff' (includes .debian.tar.gz), 'dsc', 'tar'.
The list of files. This returns a list of :class:`SourceRecordsFile`
.. versionchanged:: 1.6
.. deprecated: 1.0
Used to be a list of tuples, see :class:`SourceRecordFile` for the tuple
layout.
.. attribute:: index
......@@ -1519,6 +1519,30 @@ Records (Release files, Packages, Sources)
A string describing the version of the source package.
.. class:: SourceRecordsFile
Represents a file in a source record.
.. versionadded:: 1.6
Before 1.6, this was a tuple `(md5, size, path, type)`.
.. attribute:: hashes
A :class:`HashStringList` of the file's hashes.
.. attribute:: path
The path to the file
.. attribute:: size
The size of the file
.. attribute:: type
The type of the file. Can be 'diff' (includes .debian.tar.gz), 'dsc', or 'tar'.
The Acquire interface
----------------------
The Acquire Interface is responsible for all sorts of downloading in apt. All
......
......@@ -356,8 +356,7 @@ static PyGetSetDef PkgSrcRecordsGetSet[] = {
"A dictionary describing the build-time dependencies of the package;\n"
"the format is the same as used for apt_pkg.Version.depends_list_str."},
{"files",PkgSrcRecordsGetFiles,0,
"A list of tuples (md5: str, size: int, path: str, type: str), whereas\n"
"'type' can be 'diff' (includes .debian.tar.gz), 'dsc', 'tar'."},
"A list of :class:`SourceRecordFiles` objects."},
{"index",PkgSrcRecordsGetIndex,0,
"The index file associated with this record as a list of\n"
"apt_pkg.IndexFile objects."},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment