From 076b6d52fa1ea261684de2117edc21af8342b752 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 11 Jul 2013 16:12:05 +0200 Subject: issue warning for unknown diagnostics in luaotfload-tool --- luaotfload-tool.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 4afd9d1..5028515 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -1338,16 +1338,22 @@ do if asked.files == true then errcnt = verify_files (errcnt, info) + asked.files = nil end if asked.permissions == true then errcnt = check_permissions (errcnt) + asked.permissions = nil end if asked.repository == true then --errcnt = check_upstream (info.notes.revision) check_upstream (info.notes.revision) + asked.repository = nil end - + local rest = next (asked) + if rest ~= nil then --> something unknown + out ("Unknown diagnostic “%s”.", rest) + end if errcnt == 0 then --> success out ("Everything appears to be in order, \z you may sleep well.") -- cgit v1.2.3 From 5eb884d8fd73b5ddf1276f1aa408903712e78c51 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 14 Jul 2013 15:17:44 +0200 Subject: fix confusing warning message in luaotfload-tool.lua --- luaotfload-tool.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 5028515..17978f8 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -1129,8 +1129,8 @@ do if kpsefind_file ("https.lua", "lua") == nil then check_upstream = function (errcnt) out [[============= upstream repository ============= - Github API access requires the luasec library. WARNING: Cannot retrieve repository data. + Github API access requires the luasec library. Grab it from and retry.]] return errcnt -- cgit v1.2.3 From af6b5d35884ba2f45b4b0220e7be88afde6a0009 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 14 Jul 2013 16:07:58 +0200 Subject: fix path handling of luaotfload-tool on Win systems --- luaotfload-tool.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 17978f8..21f73d1 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -1022,8 +1022,16 @@ do return lpegmatch (p_permissions, raw) end + local trailingslashes = P"/"^1 * P(-1) + local stripslashes = C((1 - trailingslashes)^0) + local get_permissions = function (t, location) + if stringsub (location, #location) == "/" then + --- strip trailing slashes (lfs idiosyncrasy on Win) + location = lpegmatch (stripslashes, location) + end local attributes = lfsattributes (location) + if not attributes and t == "f" then attributes = get_tentative_attributes (location) if not attributes then -- cgit v1.2.3 From b2235e724443f86716694f4e45df9f1261873069 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 16 Jul 2013 21:30:48 +0200 Subject: adapt strings for 20th century OS Windows appears to still lack a unicode capable terminal emulator. http://tug.org/pipermail/luatex/2013-July/004547.html No comment. --- luaotfload-tool.lua | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 21f73d1..f7558e8 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -190,11 +190,11 @@ This tool is part of the luaotfload package. Valid options are: -V --version print version and exit -h --help print this message - --diagnose=CHECK run a self test procedure; one of “files”, - “permissions”, or “repository” + --diagnose=CHECK run a self test procedure; one of "files", + "permissions", or "repository" - --alias= force behavior of “luaotfload-tool” or legacy - “mkluatexfontdb” + --alias= force behavior of "luaotfload-tool" or legacy + "mkluatexfontdb" ------------------------------------------------------------------------------- DATABASE @@ -228,7 +228,7 @@ The font database will be saved to FONT CACHE --cache= operate on font cache, where is - “show”, “purge”, or “erase” + "show", "purge", or "erase" The font cache will be written to %s @@ -248,8 +248,8 @@ Valid options: -vvv print all steps of directory searching -V --version print version and exit -h --help print this message - --alias= force behavior of “luaotfload-tool” or legacy - “mkluatexfontdb” + --alias= force behavior of "luaotfload-tool" or legacy + "mkluatexfontdb" The font database will be saved to %s @@ -280,9 +280,9 @@ end local version_msg = function ( ) texiowrite_nl(stringformat( - "%s version “%s”\n" .. -- no \z due to 5.1 compatibility - "database version “%s”\n" .. - "Lua interpreter: %s; version “%s”\n", + "%s version %q\n" .. -- no \z due to 5.1 compatibility + "database version %q\n" .. + "Lua interpreter: %s; version %q\n", config.luaotfload.self, version, names.version, @@ -776,21 +776,21 @@ actions.query = function (job) if success then logs.names_report(false, 0, - "resolve", "Font “%s” found!", query) + "resolve", "Font %q found!", query) if subfont then logs.names_report(false, 0, "resolve", - "Resolved file name “%s”, subfont nr. “%s”", + "Resolved file name %q, subfont nr. %q", foundname, subfont) else logs.names_report(false, 0, "resolve", - "Resolved file name “%s”", foundname) + "Resolved file name %q", foundname) end if job.show_info then show_font_info(foundname, query, job.full_info, job.warnings) end else logs.names_report(false, 0, - "resolve", "Cannot find “%s”.", query) + "resolve", "Cannot find %q.", query) if job.fuzzy == true then logs.names_report(false, 0, "resolve", "Looking for close matches, this may take a while ...") @@ -1303,7 +1303,7 @@ do release_url) return true else - out "There weren’t any new releases in the meantime." + out "There weren't any new releases in the meantime." out "Luaotfload is up to date." end return false @@ -1360,7 +1360,7 @@ do local rest = next (asked) if rest ~= nil then --> something unknown - out ("Unknown diagnostic “%s”.", rest) + out ("Unknown diagnostic %q.", rest) end if errcnt == 0 then --> success out ("Everything appears to be in order, \z -- cgit v1.2.3 From f4839beb7200eaa46fabdcb1a9000d4844520844 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 19 Jul 2013 14:38:20 +0200 Subject: add revision info to output of --version in luaotfload-tool --- luaotfload-tool.lua | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index f7558e8..ea6b525 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -161,8 +161,12 @@ require"luaotfload-override.lua" --- this populates the logs.* namespace require"luaotfload-database" require"alt_getopt" -local version = "2.3" -- same version number as luaotfload -local names = fonts.names +local names = fonts.names + +local status_file = "luaotfload-status" +local status = require (status_file) + +local version = "2.3" local sanitize_string = names.sanitize_string @@ -281,10 +285,12 @@ end local version_msg = function ( ) texiowrite_nl(stringformat( "%s version %q\n" .. -- no \z due to 5.1 compatibility + "revision %q\n" .. "database version %q\n" .. "Lua interpreter: %s; version %q\n", config.luaotfload.self, version, + status.notes.revision, names.version, runtime[1], runtime[2])) @@ -953,10 +959,10 @@ do logs.names_report (false, 0, "diagnose", ...) end - local verify_files = function (errcnt, info) + local verify_files = function (errcnt, status) out "================ verify files =================" - local hashes = info.hashes - local notes = info.notes + local hashes = status.hashes + local notes = status.notes if not hashes or #hashes == 0 then out ("FAILED: cannot read checksums from %s.", status_file) return 1/0 @@ -1329,7 +1335,6 @@ do --- github api stuff end local anamneses = { "files", "repository", "permissions" } - local status_file = "luaotfload-status" actions.diagnose = function (job) local errcnt = 0 @@ -1341,11 +1346,8 @@ do asked = tabletohash (asked, true) end - out "Loading file hashes." - local info = require (status_file) - if asked.files == true then - errcnt = verify_files (errcnt, info) + errcnt = verify_files (errcnt, status) asked.files = nil end if asked.permissions == true then @@ -1353,8 +1355,7 @@ do asked.permissions = nil end if asked.repository == true then - --errcnt = check_upstream (info.notes.revision) - check_upstream (info.notes.revision) + check_upstream (status.notes.revision) asked.repository = nil end -- cgit v1.2.3 From 3fddf98f1682b7c61b7c5e8543fa0665e38308f8 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 22 Jul 2013 22:15:46 +0200 Subject: fix return value of set_logout() --- luaotfload-tool.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index ea6b525..155f764 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -1539,7 +1539,7 @@ local process_cmdline = function ( ) -- unit -> jobspec result.help_version = "mkluatexfontdb" action_pending["generate"] = true result.log_level = math.max(1, result.log_level) - logs.set_logout"stdout" + logs.set_logout("stdout", finalizers) elseif nopts == 0 then action_pending["help"] = true result.help_version = "short" -- cgit v1.2.3 From 2331b6838f623d4800e79e92c50ce55f955d7776 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 24 Jul 2013 00:19:09 +0200 Subject: bump version, update NEWS --- luaotfload-tool.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'luaotfload-tool.lua') diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 155f764..801ae72 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -4,7 +4,7 @@ -- DESCRIPTION: database functionality -- REQUIREMENTS: luaotfload 2.2 -- AUTHOR: Khaled Hosny, Élie Roux, Philipp Gesang --- VERSION: 2.3a +-- VERSION: 2.3b -- LICENSE: GPL v2 -- MODIFIED: 2013-06-02 19:23:54+0200 ----------------------------------------------------------------------- @@ -166,7 +166,7 @@ local names = fonts.names local status_file = "luaotfload-status" local status = require (status_file) -local version = "2.3" +local version = "2.3b" local sanitize_string = names.sanitize_string -- cgit v1.2.3