From e77c65af8054fbeb149930193a975beb355852fe Mon Sep 17 00:00:00 2001 From: Daniel Jaouen Date: Fri, 28 Mar 2014 19:20:51 -0400 Subject: [PATCH] Update homebrew module. --- packaging/homebrew | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packaging/homebrew b/packaging/homebrew index 12fbf89c0f4..249dee33f09 100644 --- a/packaging/homebrew +++ b/packaging/homebrew @@ -362,16 +362,18 @@ class Homebrew(object): cmd = [ "{brew_path}".format(brew_path=self.brew_path), - "list", - "-m1", + "info", + self.current_package, ] rc, out, err = self.module.run_command(cmd) - packages = [package for package in out.split('\n') if package] + for line in out.split('\n'): + if ( + re.search(r'Built from source', line) + or re.search(r'Poured from bottle', line) + ): + return True - if rc == 0 and self.current_package in packages: - return True - else: - return False + return False def _outdated_packages(self): rc, out, err = self.module.run_command([