opkg: fix package state detection

This commit is contained in:
Mikolaj Chwalisz 2014-10-08 17:57:01 +02:00
parent 8b51b7642c
commit 9793731668

View file

@ -67,7 +67,7 @@ def query_package(module, opkg_path, name, state="present"):
if state == "present":
rc, out, err = module.run_command("%s list-installed | grep -q ^%s" % (pipes.quote(opkg_path), pipes.quote(name)), use_unsafe_shell=True)
rc, out, err = module.run_command("%s list-installed | grep -q \"^%s \"" % (pipes.quote(opkg_path), pipes.quote(name)), use_unsafe_shell=True)
if rc == 0:
return True