MCPcopy Create free account
hub / github.com/aptly-dev/aptly / CheckDuplicate

Method CheckDuplicate

deb/publish.go:1345–1355  ·  view source on GitHub ↗

CheckDuplicate verifies that there's no published repo with the same name

(repo *PublishedRepo)

Source from the content-addressed store, hash-verified

1343
1344// CheckDuplicate verifies that there's no published repo with the same name
1345func (collection *PublishedRepoCollection) CheckDuplicate(repo *PublishedRepo) *PublishedRepo {
1346 collection.loadList()
1347
1348 for _, r := range collection.list {
1349 if r.Prefix == repo.Prefix && r.Distribution == repo.Distribution && r.Storage == repo.Storage {
1350 return r
1351 }
1352 }
1353
1354 return nil
1355}
1356
1357// Update stores updated information about repo in DB
1358func (collection *PublishedRepoCollection) Update(repo *PublishedRepo) error {

Callers 4

AddMethod · 0.95
apiPublishRepoOrSnapshotFunction · 0.80

Calls 1

loadListMethod · 0.95

Tested by 1