From 92406467032682c8b0bdbb67576bbe177c4e868f Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 23 Jul 2009 01:31:51 +0000 Subject: RPMng: force incremental prelink call if prelink is installed on the system -- fixes spurious package verification failures (patch from HunterM) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5378 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Tools/RPMng.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib/Client/Tools/RPMng.py b/src/lib/Client/Tools/RPMng.py index eb7ad527b..bf04940e4 100644 --- a/src/lib/Client/Tools/RPMng.py +++ b/src/lib/Client/Tools/RPMng.py @@ -121,6 +121,15 @@ class RPMng(Bcfg2.Client.Tools.PkgTool): if '' in self.verify_flags: self.verify_flags.remove('') self.logger.debug('version_fail_action = %s' % self.version_fail_action) + # Force a re- prelink of all packages if prelink exists. + # Many, if not most package verifies can be caused by out of date prelinking. + if os.path.isfile('/usr/sbin/prelink'): + cmdrc, output = self.cmd.run('/usr/sbin/prelink -a -mR') + if cmdrc == 0: + self.logger.debug('Pre-emptive prelink succeeded') + else: + # FIXME : this is dumb - what if the output is huge? + self.logger.error('Pre-emptive prelink failed: %s' % output) def RefreshPackages(self): -- cgit v1.2.3-1-g7c22