diff --git a/libtool-wrapper-check.diff b/libtool-wrapper-check.diff index 46e17e4..4f9b01a 100644 --- a/libtool-wrapper-check.diff +++ b/libtool-wrapper-check.diff @@ -20,7 +20,7 @@ index c7fadab..62951d6 100644 + if is_shell: + count= 0 -+ for l in file(pkgfile.path, "r"): ++ for l in open(pkgfile.path, "r"): + count = count + 1 + if (l.find("This wrapper script should never be moved out of the build directory") != -1): + printError(pkg, 'libtool-wrapper-in-package', fname) diff --git a/rpmlint.changes b/rpmlint.changes index f8986d6..5cae955 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Aug 19 20:50:32 UTC 2016 - stefan.bruens@rwth-aachen.de + +- Update some checks to work on both Python 2 and 3 + ------------------------------------------------------------------- Mon Jul 25 14:27:42 UTC 2016 - lnussel@suse.de diff --git a/script-interpreter-only-for-exec-sc.diff b/script-interpreter-only-for-exec-sc.diff index 7e007e3..3817ccf 100644 --- a/script-interpreter-only-for-exec-sc.diff +++ b/script-interpreter-only-for-exec-sc.diff @@ -16,7 +16,7 @@ index ee5039c..4a698cd 100644 elif interpreter or mode_is_exec or script_regex.search(f): if interpreter: - if not interpreter_regex.search(interpreter): -+ if mode & 0111 != 0 and not interpreter_regex.search(interpreter): ++ if mode & 0o111 != 0 and not interpreter_regex.search(interpreter): printError(pkg, 'wrong-script-interpreter', f, interpreter) elif not nonexec_file and not \ diff --git a/suse-sysv-init-checks.diff b/suse-sysv-init-checks.diff index 66e0f44..07a9cf2 100644 --- a/suse-sysv-init-checks.diff +++ b/suse-sysv-init-checks.diff @@ -28,9 +28,9 @@ index f9b13a1..f81a450 100644 initscript_list = [] + + # check chkconfig call in %post and %preun -+ postin = Pkg.b2s(pkg[rpm.RPMTAG_POSTIN]) or pkg.scriptprog(rpm.RPMTAG_POSTINPROG) -+ preun = Pkg.b2s(pkg[rpm.RPMTAG_PREUN]) or pkg.scriptprog(rpm.RPMTAG_PREUNPROG) -+ postun = Pkg.b2s(pkg[rpm.RPMTAG_POSTUN]) or pkg.scriptprog(rpm.RPMTAG_POSTUNPROG) ++ postin = pkg[rpm.RPMTAG_POSTIN] or pkg.scriptprog(rpm.RPMTAG_POSTINPROG) ++ preun = pkg[rpm.RPMTAG_PREUN] or pkg.scriptprog(rpm.RPMTAG_PREUNPROG) ++ postun = pkg[rpm.RPMTAG_POSTUN] or pkg.scriptprog(rpm.RPMTAG_POSTUNPROG) + for fname, pkgfile in pkg.files().items():