Skip to content

Commit

Permalink
add example use cases, clarify 'no base_url' case, use "repodata_vers…
Browse files Browse the repository at this point in the history
…ion": 2
  • Loading branch information
dholth committed Sep 6, 2023
1 parent 26b498c commit 874b477
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions cep-base-url.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@

## Abstract

Conda packages need to be stored in the same directory as repodata.json.
Conda packages need to be stored in the same directory as `repodata.json`.

This can be inconvenient especially when generating alternative repodata.json for the same set of packages.
This can be inconvenient especially when using alternative `repodata.json` for
the same set of packages. For example, a user might be interested in installing
packages based on an older snapshot of the index data that points to packages
from the original index. Or a user might want to subset `repodata.json` based on
policy.

## Specification

Expand All @@ -26,7 +30,7 @@ A minimal `repodata.json` looks like this.
"repodata_version": 1}
```

Add `base_url` to the `info` object.
Add `base_url` to the `info` object. Increment `repodata_version`.

```
{"info": {"subdir": "...", "base_url":"https://repo.anaconda.com/repo/main/linux-64/"},
Expand All @@ -40,6 +44,11 @@ Append `base_url` and `package-name.conda` when downloading a package.

`base_url` can be an absolute or a relative URL.

In the absence of `base_url`, packages are loaded relative to the
`repodata.json`. Index data without the new `base_url` will continue to have
`"repodata_version": 1`, but index data including `base_url` will have
`"repodata_version": 2`.

## Copyright

All CEPs are explicitly [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/).

0 comments on commit 874b477

Please sign in to comment.