Using separate buffer per analyzed spec in `rpmssnapshot.go`. (#6706)
This commit is contained in:
Родитель
b371811724
Коммит
7cd1a4fa68
|
@ -152,8 +152,6 @@ func (s *SnapshotGenerator) generateSnapshotInChroot(distTag string) (err error)
|
|||
}
|
||||
|
||||
func (s *SnapshotGenerator) readBuiltRPMs(specPaths []string, defines map[string]string) (allBuiltRPMs []string, err error) {
|
||||
var builtRPMs []string
|
||||
|
||||
buildArch, err := rpm.GetRpmArch(runtime.GOARCH)
|
||||
if err != nil {
|
||||
return
|
||||
|
@ -171,14 +169,14 @@ func (s *SnapshotGenerator) readBuiltRPMs(specPaths []string, defines map[string
|
|||
specDirPath := filepath.Dir(specPath)
|
||||
|
||||
go func(pathIter string) {
|
||||
builtRPMs, err = rpm.QuerySPECForBuiltRPMs(pathIter, specDirPath, buildArch, defines)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("failed to query built RPMs from (%s):\n%w", pathIter, err)
|
||||
builtRPMs, queryErr := rpm.QuerySPECForBuiltRPMs(pathIter, specDirPath, buildArch, defines)
|
||||
if queryErr != nil {
|
||||
queryErr = fmt.Errorf("failed to query built RPMs from (%s):\n%w", pathIter, queryErr)
|
||||
}
|
||||
|
||||
resultsChannel <- SnapshotResult{
|
||||
rpms: builtRPMs,
|
||||
err: err,
|
||||
err: queryErr,
|
||||
}
|
||||
}(specPath)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче