From 46f987c48296ebd35c153c04488fcf7ee97a41bd Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 7 Oct 2014 11:09:10 +0200 Subject: [PATCH] rpm: fix caching of provides Now each provide is resolved really once. --- src/rpm.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rpm.ml b/src/rpm.ml index b88ac73..71cdab2 100644 --- a/src/rpm.ml +++ b/src/rpm.ml @@ -211,7 +211,10 @@ let rpm_get_all_requires pkgs = try let provides = try Hashtbl.find rpm_providers x - with Not_found -> rpm_pkg_whatprovides (get_rpm ()) x in + with Not_found -> + let p = rpm_pkg_whatprovides (get_rpm ()) x in + Hashtbl.add rpm_providers x p; + p in Array.fold_left ( fun newset p -> match rpm_package_of_string p with -- 1.9.3