|
|
@ -119,6 +119,7 @@ class Homebrew(object):
|
|
|
|
/ # slash (for taps)
|
|
|
|
/ # slash (for taps)
|
|
|
|
\+ # plusses
|
|
|
|
\+ # plusses
|
|
|
|
- # dashes
|
|
|
|
- # dashes
|
|
|
|
|
|
|
|
: # colons (for URLs)
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
INVALID_PATH_REGEX = _create_regex_group(VALID_PATH_CHARS)
|
|
|
|
INVALID_PATH_REGEX = _create_regex_group(VALID_PATH_CHARS)
|
|
|
@ -394,18 +395,17 @@ class Homebrew(object):
|
|
|
|
|
|
|
|
|
|
|
|
return False
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
def _outdated_packages(self):
|
|
|
|
def _current_package_is_outdated(self):
|
|
|
|
|
|
|
|
if not self.valid_package(self.current_package):
|
|
|
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
rc, out, err = self.module.run_command([
|
|
|
|
rc, out, err = self.module.run_command([
|
|
|
|
self.brew_path,
|
|
|
|
self.brew_path,
|
|
|
|
'outdated',
|
|
|
|
'outdated',
|
|
|
|
|
|
|
|
self.current_package,
|
|
|
|
])
|
|
|
|
])
|
|
|
|
return [line.split(' ')[0].strip() for line in out.split('\n') if line]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _current_package_is_outdated(self):
|
|
|
|
|
|
|
|
if not self.valid_package(self.current_package):
|
|
|
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return self.current_package in self._outdated_packages()
|
|
|
|
return rc != 0
|
|
|
|
|
|
|
|
|
|
|
|
def _current_package_is_installed_from_head(self):
|
|
|
|
def _current_package_is_installed_from_head(self):
|
|
|
|
if not Homebrew.valid_package(self.current_package):
|
|
|
|
if not Homebrew.valid_package(self.current_package):
|
|
|
|