Propagate verify when serializing

This commit is contained in:
Ettore Di Giacinto
2021-03-15 11:37:56 +01:00
parent f8989e464e
commit 268239a561
2 changed files with 15 additions and 0 deletions

View File

@@ -76,4 +76,7 @@ type Repository interface {
SetBackend(b compiler.CompilerBackend)
FileSearch(pattern string) (pkg.Packages, error)
SearchArtefact(p pkg.Package) (compiler.Artifact, error)
SetVerify(bool)
GetVerify() bool
}

View File

@@ -444,10 +444,19 @@ func (r *LuetSystemRepository) GetAuthentication() map[string]string {
func (r *LuetSystemRepository) GetType() string {
return r.LuetRepository.Type
}
func (r *LuetSystemRepository) SetType(p string) {
r.LuetRepository.Type = p
}
func (r *LuetSystemRepository) GetVerify() bool {
return r.LuetRepository.Verify
}
func (r *LuetSystemRepository) SetVerify(p bool) {
r.LuetRepository.Verify = p
}
func (r *LuetSystemRepository) GetBackend() compiler.CompilerBackend {
return r.Backend
}
@@ -1082,6 +1091,8 @@ func (r *LuetSystemRepository) Sync(force bool) (Repository, error) {
repo.SetType(r.GetType())
repo.SetPriority(r.GetPriority())
repo.SetName(r.GetName())
repo.SetVerify(r.GetVerify())
InfoC(
aurora.Yellow(":information_source:").String() +
aurora.Magenta("Repository: ").String() +
@@ -1105,6 +1116,7 @@ func (r *LuetSystemRepository) Serialize() (*LuetSystemRepositoryMetadata, LuetS
Revision: r.Revision,
LastUpdate: r.LastUpdate,
RepositoryFiles: r.RepositoryFiles,
Verify: r.Verify,
}
// Check if is needed set the index or simply use