V3 Repodata¶
Overview¶
Repodata v3 is a proposal that
includes a top-level v3 key and sub-levels named after package extensions
(.tar.bz2, .conda, .whl). conda-index can generate v3 repodata by
using the --repodata-next flag:
conda index /path/to/channel --repodata-next
Or via the Python API:
from conda_index.index import ChannelIndex
channel_index = ChannelIndex("/path/to/channel", "my_channel", repodata_v3=True)
channel_index.index(...)
Structure¶
With v3 repodata enabled, the generated repodata.json has the following
structure:
{
"info": {
"repodata_revisions": [
{
"n_packages": 1,
"newest": 1758039171969,
"oldest": 1758039171969,
"revision": 3
}
],
"subdir": "noarch"
},
"packages": {},
"packages.conda": {},
"removed": [],
"repodata_version": 1,
"v3": {
"conda": {
"zstd-1.5.7-h817c040_0": {
"build": "h817c040_0",
"build_number": 0,
"depends": [...],
...
}
},
"tar.bz2": {},
"whl": {}
}
}
Run-Exports in Shards (CEP 21)¶
When using sharded repodata (--write-shards), each shard includes
run_exports data for its packages. This implements CEP
21.
Run-exports describe which dependencies a package imposes on packages that link against it. Including this information directly in the repodata shards helps build tools to generate correct dependencies for new packages.
In sharded repodata, a run_exports field is included inside individual package
records, instead of collecting all run_exports in their own section or in a
separate file.
Run-exports is always included in sharded repodata
Run-Exports JSON¶
A standalone run_exports.json file is also written per subdir when
the --run-exports flag is passed.