Skip to content

Commit

Permalink
Rename collections -> repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
tarkah committed Mar 1, 2024
1 parent 46ab75b commit 400ef52
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
28 changes: 14 additions & 14 deletions boulder/data/profile.d/default-x86_64.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
default-x86_64:
collections:
volatile:
uri: "https://dev.serpentos.com/volatile/x86_64/stone.index"
description: "Volatile moss repo"
priority: 0
repositories:
volatile:
uri: "https://dev.serpentos.com/volatile/x86_64/stone.index"
description: "Volatile moss repo"
priority: 0
local-x86_64:
collections:
volatile:
uri: "https://dev.serpentos.com/volatile/x86_64/stone.index"
description: "Volatile moss repo"
priority: 0
local:
uri: "file:///var/cache/boulder/repos/local-x86_64/stone.index"
description: "Local development moss repo"
priority: 10
repositories:
volatile:
uri: "https://dev.serpentos.com/volatile/x86_64/stone.index"
description: "Volatile moss repo"
priority: 0
local:
uri: "file:///var/cache/boulder/repos/local-x86_64/stone.index"
description: "Local development moss repo"
priority: 10
4 changes: 2 additions & 2 deletions boulder/src/cli/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub fn list(manager: profile::Manager) -> Result<(), Error> {
println!("{id}:");

for (id, repo) in profile
.collections
.repositories
.iter()
.sorted_by(|(_, a), (_, b)| a.priority.cmp(&b.priority).reverse())
{
Expand All @@ -118,7 +118,7 @@ pub async fn add<'a>(
.save_profile(
id.clone(),
Profile {
collections: repository::Map::with(repos),
repositories: repository::Map::with(repos),
},
)
.await?;
Expand Down
4 changes: 2 additions & 2 deletions boulder/src/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl From<String> for Id {
/// Profile configuration data
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Profile {
pub collections: repository::Map,
pub repositories: repository::Map,
}

/// A map of profiles
Expand Down Expand Up @@ -112,7 +112,7 @@ impl<'a> Manager<'a> {
pub fn repositories(&self, profile: &Id) -> Result<&repository::Map, Error> {
self.profiles
.get(profile)
.map(|profile| &profile.collections)
.map(|profile| &profile.repositories)
.ok_or_else(|| Error::MissingProfile(profile.clone()))
}

Expand Down

0 comments on commit 400ef52

Please sign in to comment.