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

Method Update

deb/publish.go:1358–1368  ·  view source on GitHub ↗

Update stores updated information about repo in DB

(repo *PublishedRepo)

Source from the content-addressed store, hash-verified

1356
1357// Update stores updated information about repo in DB
1358func (collection *PublishedRepoCollection) Update(repo *PublishedRepo) error {
1359 batch := collection.db.CreateBatch()
1360 _ = batch.Put(repo.Key(), repo.Encode())
1361
1362 if repo.SourceKind == SourceLocalRepo {
1363 for component, item := range repo.sourceItems {
1364 _ = batch.Put(repo.RefKey(component), item.packageRefs.Encode())
1365 }
1366 }
1367 return batch.Write()
1368}
1369
1370// LoadShallow loads basic information on the repo's sources
1371//

Callers 1

AddMethod · 0.95

Calls 6

CreateBatchMethod · 0.65
PutMethod · 0.65
WriteMethod · 0.65
KeyMethod · 0.45
EncodeMethod · 0.45
RefKeyMethod · 0.45

Tested by

no test coverage detected