From e6238d32facab6cf4710b410bfb8ea580c49ab3c Mon Sep 17 00:00:00 2001 From: Peter Dyer Date: Wed, 19 Sep 2018 19:52:58 +0100 Subject: [PATCH] Set SigLevel to 0 Previous default SigLevels caused 3rd party databases to take a very long time to load and also to not load properly. Probably due to missing keys(?). Pacman takes a long time to check the databases. For now, always set to SigLevel 0 like how go-alpm did in its config parsing. Needs more looking into for a proper fix. --- config.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/config.go b/config.go index f725b4cb..e00110e0 100644 --- a/config.go +++ b/config.go @@ -350,19 +350,20 @@ func configureAlpm(conf *pacmanconf.Config) error { var err error // TODO: set SigLevel - sigLevel := alpm.SigPackage | alpm.SigPackageOptional | alpm.SigDatabase | alpm.SigDatabaseOptional - localFileSigLevel := alpm.SigUseDefault - remoteFileSigLevel := alpm.SigUseDefault + //sigLevel := alpm.SigPackage | alpm.SigPackageOptional | alpm.SigDatabase | alpm.SigDatabaseOptional + //localFileSigLevel := alpm.SigUseDefault + //remoteFileSigLevel := alpm.SigUseDefault for _, repo := range pacmanConf.Repos { // TODO: set SigLevel - db, err := alpmHandle.RegisterSyncDb(repo.Name, sigLevel) + db, err := alpmHandle.RegisterSyncDb(repo.Name, 0) if err != nil { return err } db.SetServers(repo.Servers) db.SetUsage(toUsage(repo.Usage)) + } if err = alpmHandle.SetCacheDirs(pacmanConf.CacheDir...); err != nil { @@ -404,7 +405,7 @@ func configureAlpm(conf *pacmanconf.Config) error { return err } - if err = alpmHandle.SetDefaultSigLevel(sigLevel); err != nil { + /*if err = alpmHandle.SetDefaultSigLevel(sigLevel); err != nil { return err } @@ -414,7 +415,7 @@ func configureAlpm(conf *pacmanconf.Config) error { if err = alpmHandle.SetRemoteFileSigLevel(remoteFileSigLevel); err != nil { return err - } + }*/ if err = alpmHandle.SetDeltaRatio(pacmanConf.UseDelta); err != nil { return err