mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-11-18 11:21:25 +00:00
Merge pull request #84 from NeilHanlon/fix/83
Fix bug in setting build/srpm stage packages for project
This commit is contained in:
commit
95d7351c22
@ -568,6 +568,9 @@ func kindCatalogGroupInstallOptions(tx peridotdb.Access, req *peridotpb.SyncCata
|
||||
return nil, fmt.Errorf("failed to parse build groupinstall options: %w", err)
|
||||
}
|
||||
err = tx.SetBuildRootPackages(req.ProjectId.Value, srpmPackages, buildPackages)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to set buildroot packages for project: %w", err)
|
||||
}
|
||||
|
||||
ret.SrpmPackages = append(ret.SrpmPackages, srpmPackages...)
|
||||
ret.BuildPackages = append(ret.BuildPackages, buildPackages...)
|
||||
|
@ -46,7 +46,7 @@ type Access interface {
|
||||
CreateProject(project *peridotpb.Project) (*models.Project, error)
|
||||
UpdateProject(id string, project *peridotpb.Project) (*models.Project, error)
|
||||
SetProjectKeys(projectId string, username string, password string) error
|
||||
SetBuildRootPackages(projectId string, srpmPackages []string, buildPackages []string) error
|
||||
SetBuildRootPackages(projectId string, srpmPackages pq.StringArray, buildPackages pq.StringArray) error
|
||||
|
||||
CreateBuild(packageId string, packageVersionId string, taskId string, projectId string) (*models.Build, error)
|
||||
GetArtifactsForBuild(buildId string) (models.TaskArtifacts, error)
|
||||
|
@ -339,7 +339,14 @@ func (a *Access) SetProjectKeys(projectId string, username string, password stri
|
||||
return err
|
||||
}
|
||||
|
||||
func (a *Access) SetBuildRootPackages(projectId string, srpmPackages []string, buildPackages []string) error {
|
||||
func (a *Access) SetBuildRootPackages(projectId string, srpmPackages pq.StringArray, buildPackages pq.StringArray) error {
|
||||
if srpmPackages == nil {
|
||||
srpmPackages = pq.StringArray{}
|
||||
}
|
||||
if buildPackages == nil {
|
||||
buildPackages = pq.StringArray{}
|
||||
}
|
||||
|
||||
_, err := a.query.Exec(
|
||||
`
|
||||
update projects set srpm_stage_packages = $2, build_stage_packages = $3
|
||||
|
Loading…
Reference in New Issue
Block a user