SHA256
1
0
forked from pool/rpmlint
rpmlint/only-reg-files-are-scripts.diff
OBS User autobuild 4d4e6f73c7 Accepting request 50483 from Base:System
Copy from Base:System/rpmlint based on submit request 50483 from user prusnak

OBS-URL: https://build.opensuse.org/request/show/50483
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=68
2010-10-14 12:32:03 +00:00

22 lines
690 B
Diff

--- InitScriptCheck.py
+++ InitScriptCheck.py
@@ -18,7 +18,7 @@
import AbstractCheck
import Config
import Pkg
-
+import stat
chkconfig_content_regex = re.compile('^\s*#\s*chkconfig:\s*([-0-9]+)\s+[-0-9]+\s+[-0-9]+')
subsys_regex = re.compile('/var/lock/subsys/([^/"\'\n\s;&|]+)', re.MULTILINE)
@@ -50,7 +50,8 @@
for fname, pkgfile in pkg.files().items():
if not fname.startswith('/etc/init.d/') and \
- not fname.startswith('/etc/rc.d/init.d/'):
+ not fname.startswith('/etc/rc.d/init.d/') and \
+ stat.S_ISREG(pkgfile.mode):
continue
basename = os.path.basename(fname)