| |
@@ -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