diff options
| author | Philipp Gesang <phg42.2a@gmail.com> | 2013-09-01 12:18:17 +0200 | 
|---|---|---|
| committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-09-01 12:18:17 +0200 | 
| commit | 1b5783af6e22335afa514712e738273d323bc76a (patch) | |
| tree | 355d8127c4621259cffe6cc2018b0c344e079abe | |
| parent | 1167ef911872ca57f9deacde1c4b1d5eb71309ad (diff) | |
| download | luaotfload-1b5783af6e22335afa514712e738273d323bc76a.tar.gz | |
[db] include information about conflicting file names in record
| -rw-r--r-- | luaotfload-database.lua | 30 | 
1 files changed, 26 insertions, 4 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua index a85079b..946c773 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -2369,9 +2369,9 @@ local generate_filedata = function (mappings)          local format   = entry.format   --- otf, afm, ...          local location = filedata.location --- texmf, system, ... -        local filename = filedata.full +        local fullname = filedata.full          local basename = filedata.base -        local barename = filenameonly (filename) +        local barename = filenameonly (fullname)          local subfont  = filedata.subfont          entry.index    = index @@ -2381,12 +2381,23 @@ local generate_filedata = function (mappings)          local inbase = base [location] --- no format since the suffix is known          if inbase then -            if inbase [basename] then +            local present = inbase [basename] +            if present then                  report ("both", 3, "db",                          "Conflicting basename: %q already indexed \z                           in category %s, ignoring.",                          barename, location)                  conflicts.basenames = conflicts.basenames + 1 + +                --- track conflicts per font +                local conflictdata = entry.conflicts + +                if not conflictdata then +                    entry.conflicts = { basename = present } +                else -- some conflicts already detected +                    conflictdata.basename = present +                end +              else                  inbase [basename] = index              end @@ -2400,12 +2411,23 @@ local generate_filedata = function (mappings)          local inbare = bare [location] [format]          if inbare then -            if inbare [barename] then +            local present = inbare [barename] +            if present then                  report ("both", 3, "db",                          "Conflicting barename: %q already indexed \z                           in category %s/%s, ignoring.",                          barename, location, format)                  conflicts.barenames = conflicts.barenames + 1 + +                --- track conflicts per font +                local conflictdata = entry.conflicts + +                if not conflictdata then +                    entry.conflicts = { barename = present } +                else -- some conflicts already detected +                    conflictdata.barename = present +                end +              else                  inbare [barename] = index              end  | 
