summaryrefslogtreecommitdiffhomepage
path: root/libs/ipkg/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-10-15 03:10:19 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-10-15 03:10:19 +0000
commitf83cdb1b8bff33f47867af8941d4aabcda1575f4 (patch)
treefc21e0be9086499d8c84e203f5b8717d75215a82 /libs/ipkg/luasrc
parent88d75f3257171bfe2ba61df5f1c5995a149251c6 (diff)
libs/ipkg: give caller more control over filter pattern
Diffstat (limited to 'libs/ipkg/luasrc')
-rw-r--r--libs/ipkg/luasrc/model/ipkg.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/ipkg/luasrc/model/ipkg.lua b/libs/ipkg/luasrc/model/ipkg.lua
index 73fa3c305c..d0d9788fd8 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