mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 06:21:11 +00:00 
			
		
		
		
	Backport #27266 by @merlleu Hello there, Cargo Index over HTTP is now prefered over git for package updates: we should not force users who do not need the GIT repo to have the repo created/updated on each publish (it can still be created in the packages settings). The current behavior when publishing is to check if the repo exist and create it on the fly if not, then update it's content. Cargo HTTP Index does not rely on the repo itself so this will be useless for everyone not using the git protocol for cargo registry. This PR only disable the creation on the fly of the repo when publishing a crate. This is linked to #26844 (error 500 when trying to publish a crate if user is missing write access to the repo) because it's now optional. Co-authored-by: merlleu <r.langdorph@gmail.com> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
		
					parent
					
						
							
								95db95ef91
							
						
					
				
			
			
				commit
				
					
						77bd3acb65
					
				
			
		
					 3 changed files with 13 additions and 7 deletions
				
			
		|  | @ -110,8 +110,8 @@ func ExecuteCleanupRules(outerCtx context.Context) error { | |||
| 					if err != nil { | ||||
| 						return fmt.Errorf("GetUserByID failed: %w", err) | ||||
| 					} | ||||
| 					if err := cargo_service.AddOrUpdatePackageIndex(ctx, owner, owner, p.ID); err != nil { | ||||
| 						return fmt.Errorf("CleanupRule [%d]: cargo.AddOrUpdatePackageIndex failed: %w", pcr.ID, err) | ||||
| 					if err := cargo_service.UpdatePackageIndexIfExists(ctx, owner, owner, p.ID); err != nil { | ||||
| 						return fmt.Errorf("CleanupRule [%d]: cargo.UpdatePackageIndexIfExists failed: %w", pcr.ID, err) | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue