Skip to content

Commit

Permalink
Optimize custom repo pulls
Browse files Browse the repository at this point in the history
This removes some extra copy operations required to use repo keys and
configs.

Signed-off-by: Brian Goff <[email protected]>
  • Loading branch information
cpuguy83 committed Dec 10, 2024
1 parent 8b77d26 commit 5d1ba5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ func repoConfigAsMount(config PackageRepositoryConfig, platformCfg *RepoPlatform

for name, repoConfig := range config.Config {
// each of these sources represent a repo config file
repoConfigSt, err := repoConfig.AsState(name, sOpt, append(opts, ProgressGroup("Importing repo config: "+name))...)
repoConfigSt, err := repoConfig.AsMount(name, sOpt, append(opts, ProgressGroup("Importing repo config: "+name))...)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -544,7 +544,7 @@ func GetRepoKeys(configs []PackageRepositoryConfig, cfg *RepoPlatformConfig, sOp
names := []string{}
for _, config := range configs {
for name, repoKey := range config.Keys {
gpgKey, err := repoKey.AsState(name, sOpt, append(opts, ProgressGroup("Fetching repo key: "+name))...)
gpgKey, err := repoKey.AsMount(name, sOpt, append(opts, ProgressGroup("Fetching repo key: "+name))...)
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit 5d1ba5a

Please sign in to comment.