summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-08-28 19:24:03 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-08-28 19:24:03 +0000
commit0f732319cf69e2195b85bdade7823d439634dbae (patch)
treefe18101831d929ee80eea7d1fd9012889380ed94
parente6fcdfd7cf435ccd4826d5aef9f6a6b36cd0b3a1 (diff)
downloadbcfg2-0f732319cf69e2195b85bdade7823d439634dbae.tar.gz
bcfg2-0f732319cf69e2195b85bdade7823d439634dbae.tar.bz2
bcfg2-0f732319cf69e2195b85bdade7823d439634dbae.zip
Fix return for correct verify=false sysv packages
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2129 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Client/Solaris.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/lib/Client/Solaris.py b/src/lib/Client/Solaris.py
index 39e8a13c6..dcfa90998 100644
--- a/src/lib/Client/Solaris.py
+++ b/src/lib/Client/Solaris.py
@@ -146,18 +146,19 @@ class ToolsetImpl(Toolset):
if cmdrc != 0:
self.logger.debug("Package %s version incorrect" % entry.get('name'))
else:
- if entry.attrib.get('verify', 'true') == 'true':
- if self.setup['quick'] or entry.get('type') == 'encap':
- return True
- (vstat, odata) = self.saferun("/usr/sbin/pkgchk -n %s" % (entry.get('name')))
- if vstat == 0:
- return True
+ if self.setup['quick'] or entry.get('type') == 'encap' or \
+ entry.attrib.get('verify', 'true') == 'false':
+ return True
+ (vstat, odata) = self.saferun("/usr/sbin/pkgchk -n %s" % (entry.get('name')))
+ if vstat == 0:
+ return True
+ else:
+ output = [line for line in odata if line[:5] == 'ERROR']
+ if len([name for name in output if name.split()[-1] not in modlist]):
+ self.logger.debug("Package %s content verification failed" % \
+ (entry.get('name')))
else:
- output = [line for line in odata if line[:5] == 'ERROR']
- if len([name for name in output if name.split()[-1] not in modlist]):
- self.logger.debug("Package %s content verification failed" % (entry.get('name')))
- else:
- return True
+ return True
return False
def Inventory(self):