#306 Remove ldconfig check for Fedora 28+
Merged 5 years ago by churchyard. Opened 5 years ago by eclipseo.
Unknown source fix_ldconfig_check  into  devel

file modified
+28 -8
@@ -64,15 +64,35 @@

              rpm = RpmFile(pkg, nvr.version, nvr.release)

              if not self.rpms.find_re(self.sofiles_regex, pkg):

                  continue

-             if not rpm.post or '/sbin/ldconfig' not in rpm.post or \

-                 not rpm.postun or '/sbin/ldconfig' not in rpm.postun:

-                     bad_pkgs.append(pkg)

-         if bad_pkgs:

-             self.set_passed(self.FAIL,

-                             '/sbin/ldconfig not called in '

-                             + ', '.join(bad_pkgs))

+             if self.flags['EPEL5'] or self.flags['EPEL6'] \

+                 or self.flags['EPEL7']:

+                 if not rpm.post or '/sbin/ldconfig' not in rpm.post or \

+                     not rpm.postun or '/sbin/ldconfig' not in rpm.postun:

+                         bad_pkgs.append(pkg)

+             else:

+                 if (rpm.post and '/sbin/ldconfig' in rpm.post) \

+                     or (rpm.postun and '/sbin/ldconfig' in rpm.postun):

+                         bad_pkgs.append(pkg)

+         

+         if self.flags['EPEL5'] or self.flags['EPEL6'] \

+             or self.flags['EPEL7']:

+             if bad_pkgs:

+                 self.set_passed(self.FAIL,

+                                 '/sbin/ldconfig not called in '

+                                 + ', '.join(bad_pkgs))

+             else:

+                 self.set_passed(self.PASS)

          else:

-             self.set_passed(self.PASS)

+             self.url = 'https://fedoraproject.org/wiki/Changes/' \

+                 'Removing_ldconfig_scriptlets'

+             self.text = 'ldconfig not called in %post and %postun ' \

+                 'for Fedora 28 and later.'

+             if bad_pkgs:

+                 self.set_passed(self.FAIL,

+                                 '/sbin/ldconfig called in '

+                                 + ', '.join(bad_pkgs))

+             else:

+                 self.set_passed(self.PASS)

  

  

  class CheckHeaderFiles(CCppCheckBase):

We don't need ldconfig in %post/%postun for F28+. This PR modifies the check to warn the user if it is still present.

https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets

Pull-Request has been merged by churchyard

5 years ago
Metadata