fix(regression): respect modules enabled by ModuleMd during module builds

This commit is contained in:
Neil Hanlon 2023-03-30 15:49:49 -04:00
parent 65ba92ea9c
commit 6a6fc2924c
Signed by: neil
GPG Key ID: 705BC21EC3C70F34
2 changed files with 18 additions and 4 deletions

View File

@ -687,8 +687,15 @@ func (c *Controller) BuildArchActivity(ctx context.Context, projectId string, pa
c.log.Infof("no extra options to process for package") c.log.Infof("no extra options to process for package")
} }
extraOptions.DisabledModules = disableModules if extraOptions.DisabledModules == nil {
extraOptions.Modules = enableModules extraOptions.DisabledModules = []string{}
}
extraOptions.DisabledModules = append(extraOptions.DisabledModules, disableModules...)
if extraOptions.Modules == nil {
extraOptions.Modules = []string{}
}
extraOptions.Modules = append(extraOptions.Modules, enableModules...)
hostArch := os.Getenv("REAL_BUILD_ARCH") hostArch := os.Getenv("REAL_BUILD_ARCH")
err = c.writeMockConfig(&project, packageVersion, extraOptions, arch, hostArch, pkgGroup) err = c.writeMockConfig(&project, packageVersion, extraOptions, arch, hostArch, pkgGroup)

View File

@ -425,8 +425,15 @@ func (c *Controller) BuildSRPMActivity(ctx context.Context, upstreamPrefix strin
c.log.Infof("no extra options to process for package") c.log.Infof("no extra options to process for package")
} }
extraOptions.DisabledModules = disableModules if extraOptions.DisabledModules == nil {
extraOptions.Modules = enableModules extraOptions.DisabledModules = []string{}
}
extraOptions.DisabledModules = append(extraOptions.DisabledModules, disableModules...)
if extraOptions.Modules == nil {
extraOptions.Modules = []string{}
}
extraOptions.Modules = append(extraOptions.Modules, enableModules...)
hostArch := os.Getenv("REAL_BUILD_ARCH") hostArch := os.Getenv("REAL_BUILD_ARCH")
extraOptions.EnableNetworking = true extraOptions.EnableNetworking = true