comparison util/dependencies.lua @ 10965:f5d5fc409680

util.dependencies: Prefer net.unbound over net.adns
author Kim Alvefur <zash@zash.se>
date Thu, 25 Jun 2020 17:41:07 +0200
parents 80733851be8b
children 3b9d533da8fe
comparison
equal deleted inserted replaced
10964:d6a3d652ca32 10965:f5d5fc409680
102 if not unbound then 102 if not unbound then
103 missingdep("lua-unbound", { 103 missingdep("lua-unbound", {
104 { "luarocks", "luarocks install luaunbound" }; 104 { "luarocks", "luarocks install luaunbound" };
105 { "Source", "https://www.zash.se/luaunbound.html" }; 105 { "Source", "https://www.zash.se/luaunbound.html" };
106 }, "Old DNS resolver library will be used", err); 106 }, "Old DNS resolver library will be used", err);
107 else
108 package.preload["net.adns"] = function ()
109 local ub = require "net.unbound";
110 return ub;
111 end
107 end 112 end
108 113
109 local encodings, err = softreq "util.encodings" 114 local encodings, err = softreq "util.encodings"
110 if not encodings then 115 if not encodings then
111 if err:match("module '[^']*' not found") then 116 if err:match("module '[^']*' not found") then