summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2014-05-15 21:56:54 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2014-05-15 22:00:04 +0200
commit967a1634498f1030924ab8161ed564a9ff9ac538 (patch)
tree4defc52fb0fc86ea5e3a1469aa63e913fada30cf
parent42591e0bc48cad87eae5194cc165b510085fdae8 (diff)
downloadluaotfload-967a1634498f1030924ab8161ed564a9ff9ac538.tar.gz
[db,tool] add db creation and modification time to version message
-rw-r--r--src/luaotfload-database.lua7
-rwxr-xr-xsrc/luaotfload-tool.lua16
2 files changed, 17 insertions, 6 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index a290e7d..f216f79 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -462,6 +462,7 @@ local get_font_filter
local group_modifiers
local load_lookups
local load_names
+local getmetadata
local order_design_sizes
local ot_fullinfo
local read_blacklist
@@ -531,6 +532,11 @@ load_names = function (dry_run)
return data
end
+getmetadata = function ()
+ if not name_index then name_index = load_names() end
+ return tablefastcopy (name_index.meta)
+end
+
--- unit -> unit
load_lookups = function ( )
local foundname, data = load_lua_file(config.luaotfload.paths.lookup_path_lua)
@@ -3459,6 +3465,7 @@ names.crude_file_lookup_verbose = crude_file_lookup_verbose
names.read_blacklist = read_blacklist
names.sanitize_fontname = sanitize_fontname
names.getfilename = resolve_fullpath
+names.getmetadata = getmetadata
names.set_location_precedence = set_location_precedence
names.count_font_files = count_font_files
names.nth_font_filename = nth_font_filename
diff --git a/src/luaotfload-tool.lua b/src/luaotfload-tool.lua
index fe6057c..0db3eca 100755
--- a/src/luaotfload-tool.lua
+++ b/src/luaotfload-tool.lua
@@ -6,7 +6,7 @@
-- AUTHOR: Khaled Hosny, Élie Roux, Philipp Gesang
-- VERSION: 2.5
-- LICENSE: GPL v2.0
--- MODIFIED: 2014-01-14 13:17:04+0100
+-- MODIFIED: 2014-05-15 21:47:39+0200
-----------------------------------------------------------------------
luaotfload = luaotfload or { }
@@ -272,13 +272,13 @@ local about = [[
local version_msg = function ( )
local out = function (...) texiowrite_nl (stringformat (...)) end
local uname = os.uname ()
+ local meta = names.getmetadata ()
out (about, luaotfload.self)
- out ("%s version %q", luaotfload.self, version)
- out ("revision %q", config.luaotfload.status.notes.revision)
- out ("database version %q", names.version)
+ out ("%s version: %q", luaotfload.self, version)
+ out ("Revision: %q", config.luaotfload.status.notes.revision)
out ("Lua interpreter: %s; version %q", runtime[1], runtime[2])
- out ("Luatex SVN revision %d", status.luatex_svn)
- out ("Luatex version %.2f.%d",
+ out ("Luatex SVN revision: %d", status.luatex_svn)
+ out ("Luatex version: %.2f.%d",
status.luatex_version / 100,
status.luatex_revision)
out ("Platform: type=%s name=%s", os.type, os.name)
@@ -288,6 +288,10 @@ local version_msg = function ( )
local var = uname_vars[i]
out (" + %8s: %s", var, uname[var])
end
+ out ("Index: version=%q created=%q modified=%q",
+ config.luaotfload.status.notes.revision,
+ meta.created or "ages ago",
+ meta.modified or "ages ago")
out ""
end