more debug

This commit is contained in:
André Roth
2026-05-04 18:40:22 +02:00
parent 41f5d22637
commit 6fbcbc108c
+5 -1
View File
@@ -471,6 +471,7 @@ func apiPublishUpdateSwitch(c *gin.Context) {
AbortWithJSONError(c, http.StatusBadRequest, fmt.Errorf("snapshots shouldn't be given when updating local repo")) AbortWithJSONError(c, http.StatusBadRequest, fmt.Errorf("snapshots shouldn't be given when updating local repo"))
return return
} }
fmt.Printf("RACE DEBUG: deb.SourceLocalRepo\n")
// FIXME: lock repo ? // FIXME: lock repo ?
// localCollection := collectionFactory.LocalRepoCollection() // localCollection := collectionFactory.LocalRepoCollection()
@@ -487,6 +488,7 @@ func apiPublishUpdateSwitch(c *gin.Context) {
// resources = append(resources, string(localRepo.Key())) // resources = append(resources, string(localRepo.Key()))
// } // }
} else if published.SourceKind == deb.SourceSnapshot { } else if published.SourceKind == deb.SourceSnapshot {
fmt.Printf("RACE DEBUG: deb.SourceSnapshot: %s\n", b.Snapshots)
for _, snapshotInfo := range b.Snapshots { for _, snapshotInfo := range b.Snapshots {
snapshot, err2 := snapshotCollection.ByName(snapshotInfo.Name) snapshot, err2 := snapshotCollection.ByName(snapshotInfo.Name)
if err2 != nil { if err2 != nil {
@@ -500,11 +502,13 @@ func apiPublishUpdateSwitch(c *gin.Context) {
// FIXME: implement // FIXME: implement
err := errors.New("not implemented") err := errors.New("not implemented")
AbortWithJSONError(c, http.StatusNotFound, err) AbortWithJSONError(c, http.StatusNotFound, err)
return
} else if snapshot.SourceKind == deb.SourceLocalRepo { } else if snapshot.SourceKind == deb.SourceLocalRepo {
var repo *deb.LocalRepo var repo *deb.LocalRepo
repo, err = context.NewCollectionFactory().LocalRepoCollection().ByUUID(sourceID) repo, err = context.NewCollectionFactory().LocalRepoCollection().ByUUID(sourceID)
if err != nil { if err != nil {
AbortWithJSONError(c, http.StatusNotFound, err2) AbortWithJSONError(c, http.StatusNotFound, err)
return
} }
resources = append(resources, string(repo.Key())) resources = append(resources, string(repo.Key()))
} }