From f83cdb1b8bff33f47867af8941d4aabcda1575f4 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 15 Oct 2011 03:10:19 +0000 Subject: [PATCH] libs/ipkg: give caller more control over filter pattern --- libs/ipkg/luasrc/model/ipkg.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ipkg/luasrc/model/ipkg.lua b/libs/ipkg/luasrc/model/ipkg.lua index 73fa3c305..d0d9788fd 100644 --- a/libs/ipkg/luasrc/model/ipkg.lua +++ b/libs/ipkg/luasrc/model/ipkg.lua @@ -158,7 +158,9 @@ end -- List helper function _list(action, pat, cb) - local fd = io.popen(ipkg .. " " .. action .. (pat and " '*" .. pat:gsub("'", "") .. "*'" or "")) + local fd = io.popen(ipkg .. " " .. action .. + (pat and (" '%s'" % pat:gsub("'", "")) or "")) -- .. " | grep -vE '^ '") + if fd then local name, version, desc while true do -- 2.25.1