Ticket #1152: 0001-YUM-Add-a-check-to-ignore-verification-failures-on-c.patch

File 0001-YUM-Add-a-check-to-ignore-verification-failures-on-c.patch, 1.4 KB (added by https://www.google.com/accounts/o8/id?id=AItOawn0s7RDAZJqmy8qhaS8PFtgoke6VxxZKSI, 8 years ago)

Possible fix for this behavior

  • src/lib/Bcfg2/Client/Tools/YUM.py

    From ff15ed156703b0c854d0c3cef32cdcc8a36d80e8 Mon Sep 17 00:00:00 2001
    From: Jonathan Billings <jsbillin@umich.edu>
    Date: Tue, 26 Nov 2013 12:14:31 -0500
    Subject: [PATCH] YUM: Add a check to ignore verification failures on configuration files
    
    * Many RPM packages have files marked as configuration files
    * When Bcfg2 reinstalls a package that has a file marked as
      config(noreplace), it doesn't replace the file anyway.
    * This change ignores any verification file that is marked as a
      configuration file.
    * It doesn't distinguish the noreplace and replace kinds of files.
    ---
     src/lib/Bcfg2/Client/Tools/YUM.py |    4 ++++
     1 files changed, 4 insertions(+), 0 deletions(-)
    
    diff --git a/src/lib/Bcfg2/Client/Tools/YUM.py b/src/lib/Bcfg2/Client/Tools/YUM.py
    index c30c0a1..ea805fa 100644
    a b class YUM(Bcfg2.Client.Tools.PkgTool): 
    663663                        continue 
    664664                    elif 'no' + prob.type in verify_flags: 
    665665                        continue 
     666                    if 'configuration' in prob.file_types: 
     667                        self.logger.debug( 
     668                            "  %s is a configuration file, skipping" % fname) 
     669                        continue 
    666670                    if prob.type not in ['missingok', 'ghost']: 
    667671                        tmp.append((prob.type, prob.message)) 
    668672                if tmp != []: