diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-10-15 03:10:19 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-10-15 03:10:19 +0000 |
commit | f83cdb1b8bff33f47867af8941d4aabcda1575f4 (patch) | |
tree | fc21e0be9086499d8c84e203f5b8717d75215a82 /libs/ipkg/luasrc/model/ipkg.lua | |
parent | 88d75f3257171bfe2ba61df5f1c5995a149251c6 (diff) |
libs/ipkg: give caller more control over filter pattern
Diffstat (limited to 'libs/ipkg/luasrc/model/ipkg.lua')
-rw-r--r-- | libs/ipkg/luasrc/model/ipkg.lua | 4 |
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 |