|
|
@ -626,10 +626,18 @@ class Homebrew(object):
|
|
|
|
if opt]
|
|
|
|
if opt]
|
|
|
|
|
|
|
|
|
|
|
|
rc, out, err = self.module.run_command(cmd)
|
|
|
|
rc, out, err = self.module.run_command(cmd)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if rc == 0:
|
|
|
|
self.changed_count += 1
|
|
|
|
self.changed_count += 1
|
|
|
|
self.changed = True
|
|
|
|
self.changed = True
|
|
|
|
self.message = 'Package linked: {0}'.format(self.current_package)
|
|
|
|
self.message = 'Package linked: {0}'.format(self.current_package)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
self.failed = True
|
|
|
|
|
|
|
|
self.message = 'Package could not be linked: {0}.'.format(self.current_package)
|
|
|
|
|
|
|
|
raise HomebrewException(self.message)
|
|
|
|
|
|
|
|
|
|
|
|
def _link_packages(self):
|
|
|
|
def _link_packages(self):
|
|
|
|
for package in self.packages:
|
|
|
|
for package in self.packages:
|
|
|
|
self.current_package = package
|
|
|
|
self.current_package = package
|
|
|
@ -662,10 +670,18 @@ class Homebrew(object):
|
|
|
|
if opt]
|
|
|
|
if opt]
|
|
|
|
|
|
|
|
|
|
|
|
rc, out, err = self.module.run_command(cmd)
|
|
|
|
rc, out, err = self.module.run_command(cmd)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if rc == 0:
|
|
|
|
self.changed_count += 1
|
|
|
|
self.changed_count += 1
|
|
|
|
self.changed = True
|
|
|
|
self.changed = True
|
|
|
|
self.message = 'Package unlinked: {0}'.format(self.current_package)
|
|
|
|
self.message = 'Package unlinked: {0}'.format(self.current_package)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
self.failed = True
|
|
|
|
|
|
|
|
self.message = 'Package could not be unlinked: {0}.'.format(self.current_package)
|
|
|
|
|
|
|
|
raise HomebrewException(self.message)
|
|
|
|
|
|
|
|
|
|
|
|
def _unlink_packages(self):
|
|
|
|
def _unlink_packages(self):
|
|
|
|
for package in self.packages:
|
|
|
|
for package in self.packages:
|
|
|
|
self.current_package = package
|
|
|
|
self.current_package = package
|
|
|
|