diff --git a/pkg/db/ialpm/alpm.go b/pkg/db/ialpm/alpm.go index 2e01cfa2b..d89127055 100644 --- a/pkg/db/ialpm/alpm.go +++ b/pkg/db/ialpm/alpm.go @@ -38,7 +38,7 @@ func NewExecutor(pacmanConf *pacmanconf.Config, logger *text.Logger) (*AlpmExecu conf: pacmanConf, log: logger, installedRemotePkgNames: nil, - installedRemotePkgMap: map[string]alpm.IPackage{}, + installedRemotePkgMap: nil, installedSyncPkgNames: nil, } diff --git a/pkg/db/ialpm/high_level.go b/pkg/db/ialpm/high_level.go index 56a53bd02..54aeee031 100644 --- a/pkg/db/ialpm/high_level.go +++ b/pkg/db/ialpm/high_level.go @@ -8,6 +8,9 @@ import ( // GetPackageNamesBySource returns package names with and without correspondence in SyncDBS respectively. func (ae *AlpmExecutor) getPackageNamesBySource() { + if ae.installedRemotePkgMap == nil { + ae.installedRemotePkgMap = map[string]alpm.IPackage{} + } for _, localpkg := range ae.LocalPackages() { pkgName := localpkg.Name() if ae.SyncPackage(pkgName) != nil {