From 9793731668361012c765dc1d8450d87f44a5eb7d Mon Sep 17 00:00:00 2001 From: Mikolaj Chwalisz Date: Wed, 8 Oct 2014 17:57:01 +0200 Subject: [PATCH] opkg: fix package state detection --- packaging/opkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/opkg.py b/packaging/opkg.py index 0187abe56a8..95afd6fd8bd 100644 --- a/packaging/opkg.py +++ b/packaging/opkg.py @@ -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