Bläddra i källkod

Fix install not listing all dependencies

Sometimes yay will not list all of the dependancies it needs when
installing packages. I mostly noticed this on libjpeg-turbo and the
issue was that the packages requring libjpeg-turbo were only requesting
libjpeg which was provided by libjpeg-turbo.

Now when we cache package info from the syncdb also alias the package name
to all of it's provides.
morganamilo 7 år sedan
förälder
incheckning
5100fea56a
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      dependencies.go

+ 4 - 0
dependencies.go

@@ -175,6 +175,10 @@ func repoTreeRecursive(pkg *alpm.Package, dt *depTree, localDb *alpm.Db, syncDb
 	}
 
 	dt.Repo[pkg.Name()] = pkg
+	(*pkg).Provides().ForEach(func(dep alpm.Depend) (err error) {
+		dt.Repo[dep.Name] = pkg
+		return nil
+	})
 
 	(*pkg).Depends().ForEach(func(dep alpm.Depend) (err error) {
 		_, exists := dt.Repo[dep.Name]