Hello community, here is the log from the commit of package mpv for openSUSE:Factory checked in at 2017-08-21 11:37:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mpv (Old) and /work/SRC/openSUSE:Factory/.mpv.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "mpv" Mon Aug 21 11:37:47 2017 rev:32 rq:517779 version:unknown Changes: -------- --- /work/SRC/openSUSE:Factory/mpv/mpv.changes 2017-08-17 15:02:35.686340062 +0200 +++ /work/SRC/openSUSE:Factory/.mpv.new/mpv.changes 2017-08-21 11:37:51.851241839 +0200 @@ -1,0 +2,18 @@ +Sun Aug 20 12:17:49 UTC 2017 - aloisio@gmx.com + +- Update mpv-bash-completion to 3.3.15 + * Fix af/vf filter argument expansion (#15) + * Remove some invalid suggestions for some options (#14) + * Recognize all --profile-style options as such and complete + them + +------------------------------------------------------------------- +Sat Aug 19 19:55:04 UTC 2017 - aloisio@gmx.com + +- Update mpv-bash-completion to 3.3.14 + * Reflect changed --list-options output for --vf-add-style + options + +- Update waf to 1.9.13 + +------------------------------------------------------------------- Old: ---- mpv-bash-completion-3.3.13.tar.gz waf-1.9.9 New: ---- mpv-bash-completion-3.3.15.tar.gz waf-1.9.13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mpv.spec ++++++ --- /var/tmp/diff_new_pack.5ynkVI/_old 2017-08-21 11:37:52.823105153 +0200 +++ /var/tmp/diff_new_pack.5ynkVI/_new 2017-08-21 11:37:52.867098965 +0200 @@ -19,8 +19,8 @@ # -%define _waf_ver 1.9.9 -%define _mbc_ver 3.3.13 +%define _waf_ver 1.9.13 +%define _mbc_ver 3.3.15 %define _mpv_ver 0.26.0 %define lname libmpv1 Name: mpv ++++++ mpv-bash-completion-3.3.13.tar.gz -> mpv-bash-completion-3.3.15.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpv-bash-completion-3.3.13/README.mkd new/mpv-bash-completion-3.3.15/README.mkd --- old/mpv-bash-completion-3.3.13/README.mkd 2017-04-14 15:02:15.000000000 +0200 +++ new/mpv-bash-completion-3.3.15/README.mkd 2017-08-20 13:52:19.000000000 +0200 @@ -35,9 +35,16 @@ ## Dependencies +* Awk (any awk: gawk, nawk, mawk, etc -- should do) * Bash 4 * Lua 5.1 or 5.2 or 5.3 or LuaJIT -* mpv >= 0.14 +* mpv >= 0.23 + +**Note on older mpv versions**: The mpv command line has changed +considerably since the beginning of version 0.20 and later, making it +impossible to support older versions due to the huge number of special +cases that would need to be covered. For compatbility with older mpv +releases, please use a historic version of mpv-bash-completion. ### Optional dependencies diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpv-bash-completion-3.3.13/gen.lua new/mpv-bash-completion-3.3.15/gen.lua --- old/mpv-bash-completion-3.3.13/gen.lua 2017-04-14 15:02:15.000000000 +0200 +++ new/mpv-bash-completion-3.3.15/gen.lua 2017-08-20 13:52:19.000000000 +0200 @@ -30,7 +30,6 @@ -- Reporting on optionList() result local function debug_categories(ot) if not VERBOSE then return end - log("Counting top-level options...") local lines = {} local function count(t) local n = 0 @@ -42,11 +41,11 @@ local sum = 0 for cat,t in pairs(ot) do local c = count(t) - table.insert(lines, string.format("%s -> %d", cat, count(t))) + table.insert(lines, string.format(" %s: %d", cat, count(t))) sum = sum + c end table.sort(lines) - table.insert(lines, string.format("total %d", sum)) + table.insert(lines, 1, string.format("Found %d options:", sum)) log(table.concat(lines, "\n")) end @@ -166,9 +165,20 @@ local function expandObject(o) local h = mpv(string.format("--%s help", o)) local clist = {} + + local function lineFilter(line) + if line:match("^Available") + or line:match("^%s+%(other") + or line:match("^%s+demuxer:") + then + return false + end + return true + end + for l in h:lines() do local m = l:match("^%s+([%S.]+)") - if m then + if lineFilter(l) and m then -- oac, ovc special case: filter out --foo=needle local tail = m:match("^--[^=]+=(.*)$") if tail then @@ -200,6 +210,7 @@ if m then local choices = split(m, ",") for _,v in ipairs(choices) do + log(" + %s += [%s]", o, v) table.insert(clist, v) end end @@ -274,7 +285,7 @@ end -- Override for dynamic profile list expansion - if oneOf(o, "profile") then + if o:match("^profile") then ot = "Profile" end @@ -352,54 +363,49 @@ local function optionList() local t = {} + local prev_s = nil local h = mpv("--list-options") for s in h:lines() do - local o, s= s:match("^ %-%-(%S+)%s+(%S.*)") - if o then parseOpt(t, LOOKUP, true, o, s) end + -- Regular, top-level options + local o, ss = s:match("^%s+%-%-(%S+)%s+(%S.*)") + if o then + prev_s = ss + parseOpt(t, LOOKUP, true, o, ss) + else + -- Second-level options (--vf-add, --vf-del etc) + local o = s:match("^%s+%-%-(%S+)") + if o then + parseOpt(t, LOOKUP, true, o, prev_s) + end + end end h:close() - local fargs = {} + -- Expand filter arguments - -- Not fully present anymore in very recent git HEADs. Let's keep this - -- around for a while. - -- Still important is the expansion of --af*/--vf* to --af-add etc - if t.Object then - local no = {} - for o,p in pairs(t.Object) do - if o:sub(-1) == "*" then - local stem = o:sub(1, -2) - local alter = t.Object[stem.."-defaults"] - -- filter argument detection - for _,e in ipairs(alter.clist) do - if not fargs[stem] then fargs[stem] = {} end - if not fargs[stem][e] then fargs[stem][e] = getAVFilterArgs2(stem, e) end - end - -- af/vf aliases - for _,variant in pairs(p.clist) do - -- Drop stray matches from expandObject(), option description - -- text formatting is inconsistent, so this is hard to prevent - -- without breaking stuff elsewhere. - if variant:match("^[a-z0-9]") then - log("alias %s -> %s", variant, stem) - no[variant] = alter - end - end - no[stem] = alter - else - no[o] = p - end - if o:match("^[av]o") and p.clist then - for _,e in ipairs(p.clist) do - if not fargs[o] then fargs[o] = {} end - if not fargs[o][e] then fargs[o][e] = getAVFilterArgs2(o, e) end - end - end + local function stem(name) + local bound = name:find("-", 1, true) + if bound then + return name:sub(1, bound-1) end - t.Object = no + return name end + + local fargs = {} + if t.Object then + for name, value in pairs(t.Object) do + if name:match("^vf") or name:match("^af") then + local stem = stem(name) + for _, filter in ipairs(value.clist or {}) do + fargs[stem] = fargs[stem] or {} + fargs[stem][filter] = fargs[stem][filter] or getAVFilterArgs2(stem, filter) + fargs[name] = fargs[stem] + end -- for + end -- if + end -- for + end -- if setmetatable(t, { fargs = fargs }) return t @@ -464,8 +470,8 @@ } _mpv_profiles(){ type mpv &>/dev/null || return 0; - local p=$(mpv --profile help) - echo "${p##*:}" + mpv --profile help \ + | awk '{if(NR>2 && $1 != ""){ print $1; }}' } _mpv_drm_connectors(){ type mpv &>/dev/null || return 0;