Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rpmlint for openSUSE:Factory checked 
in at 2025-09-09 20:29:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rpmlint (Old)
 and      /work/SRC/openSUSE:Factory/.rpmlint.new.1977 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rpmlint"

Tue Sep  9 20:29:01 2025 rev:510 rq:1303173 version:2.8.0+git20250908.1aa5d478

Changes:
--------
--- /work/SRC/openSUSE:Factory/rpmlint/rpmlint.changes  2025-09-08 
09:57:20.385933212 +0200
+++ /work/SRC/openSUSE:Factory/.rpmlint.new.1977/rpmlint.changes        
2025-09-09 20:29:03.766236741 +0200
@@ -1,0 +2,20 @@
+Mon Sep 08 10:00:16 UTC 2025 - Daniel Garcia <[email protected]>
+
+- Update to version 2.8.0+git20250908.1aa5d478:
+  * Resolve `superfluous-parens`
+  * Resolve `use-implicit-booleaness-not-len`
+  * Resolve `redefined-outer-name`
+  * Resolve `consider-using-in`
+  * Resolve `consider-merging-isinstance`
+  * Simplify `AbstractPkg._gather_aux` to resolve `consider-using-enumerate`
+  * Resolve `no-else-raise`
+  * Resolve `no-else-return`
+  * Use list comprehensions
+  * Resolve `consider-using-sys-exit`
+  * Simplify code by using `sorted()`
+  * Release 2.8.0
+  * AlternativesCheck: detect update-alternatives on Fedora
+  * Run only once the validate_filters per call
+  * ZipCheck: fix utf8 decoding erros in jarfile manifest
+
+-------------------------------------------------------------------

Old:
----
  rpmlint-2.7.0+git20250905.7717a72c.tar.xz

New:
----
  rpmlint-2.8.0+git20250908.1aa5d478.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rpmlint.spec ++++++
--- /var/tmp/diff_new_pack.TAOg0G/_old  2025-09-09 20:29:04.846282257 +0200
+++ /var/tmp/diff_new_pack.TAOg0G/_new  2025-09-09 20:29:04.846282257 +0200
@@ -23,7 +23,7 @@
 %define name_suffix -%{flavor}
 %endif
 Name:           rpmlint%{name_suffix}
-Version:        2.7.0+git20250905.7717a72c
+Version:        2.8.0+git20250908.1aa5d478
 Release:        0
 Summary:        RPM file correctness checker
 License:        GPL-2.0-or-later

++++++ _service ++++++
--- /var/tmp/diff_new_pack.TAOg0G/_old  2025-09-09 20:29:04.894284280 +0200
+++ /var/tmp/diff_new_pack.TAOg0G/_new  2025-09-09 20:29:04.898284449 +0200
@@ -1,6 +1,6 @@
 <services>
   <service name="tar_scm" mode="manual">
-    <param name="versionformat">2.7.0+git%cd.%h</param>
+    <param name="versionformat">2.8.0+git%cd.%h</param>
     <param 
name="url">https://github.com/rpm-software-management/rpmlint.git</param>
     <param name="scm">git</param>
     <param name="revision">opensuse</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.TAOg0G/_old  2025-09-09 20:29:04.922285460 +0200
+++ /var/tmp/diff_new_pack.TAOg0G/_new  2025-09-09 20:29:04.930285797 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/rpm-software-management/rpmlint.git</param>
-              <param 
name="changesrevision">7717a72c6886760a8b4f6b9d79d38ab34768c93b</param></service></servicedata>
+              <param 
name="changesrevision">1aa5d478a463139e9fa02a8632b439a4aa28e346</param></service></servicedata>
 (No newline at EOF)
 

++++++ rpmlint-2.7.0+git20250905.7717a72c.tar.xz -> 
rpmlint-2.8.0+git20250908.1aa5d478.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/rpmlint-2.7.0+git20250905.7717a72c/.packit/rpmlint.spec 
new/rpmlint-2.8.0+git20250908.1aa5d478/.packit/rpmlint.spec
--- old/rpmlint-2.7.0+git20250905.7717a72c/.packit/rpmlint.spec 2025-09-05 
15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/.packit/rpmlint.spec 2025-09-08 
09:59:17.000000000 +0200
@@ -1,7 +1,7 @@
 %{!?python3: %global python3 %{__python3}}
 
 Name:           rpmlint
-Version:        2.7.0
+Version:        2.8.0
 Release:        0%{?dist}
 Summary:        Tool for checking common errors in RPM packages
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmlint-2.7.0+git20250905.7717a72c/pyproject.toml 
new/rpmlint-2.8.0+git20250908.1aa5d478/pyproject.toml
--- old/rpmlint-2.7.0+git20250905.7717a72c/pyproject.toml       2025-09-05 
15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/pyproject.toml       2025-09-08 
09:59:17.000000000 +0200
@@ -6,7 +6,7 @@
 
 [project]
 name = "rpmlint"
-version = "2.7.0"
+version = "2.8.0"
 description = "Check for common errors in RPM packages"
 license = {text = "License :: OSI Approved :: GNU General Public License v2 or 
later (GPLv2+)"}
 authors = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/checks/AbstractCheck.py 
new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/checks/AbstractCheck.py
--- old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/checks/AbstractCheck.py      
2025-09-05 15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/checks/AbstractCheck.py      
2025-09-08 09:59:17.000000000 +0200
@@ -50,9 +50,7 @@
             # start with the biggest files first
             filenames = sorted(filenames, key=lambda x: pkg.files[x].size, 
reverse=True)
             with concurrent.futures.ThreadPoolExecutor() as executor:
-                futures = []
-                for filename in filenames:
-                    futures.append(executor.submit(self.check_file, pkg, 
filename))
+                futures = [executor.submit(self.check_file, pkg, filename) for 
filename in filenames]
                 concurrent.futures.wait(futures)
                 for future in futures:
                     err = future.exception()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/checks/AlternativesCheck.py 
new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/checks/AlternativesCheck.py
--- old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/checks/AlternativesCheck.py  
2025-09-05 15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/checks/AlternativesCheck.py  
2025-09-08 09:59:17.000000000 +0200
@@ -22,7 +22,7 @@
       Requires(post) and Requires(postun) must depend on update-alternatives
     """
     # Regex to match anything that can be in requires for update-alternatives
-    re_requirement = 
re.compile(r'^(/usr/sbin/|%{?_sbindir}?/)?update-alternatives$')
+    re_requirement = 
re.compile(r'^(/usr/s?bin/|%{?_s?bindir}?/)?update-alternatives$')
     re_install = 
re.compile(r'--install\s+(?P<link>\S+)\s+(?P<name>\S+)\s+(\S+)\s+(\S+)')
     re_slave = re.compile(r'--slave\s+(?P<link>\S+)\s+(\S+)\s+(\S+)')
     command = 'update-alternatives'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/checks/I18NCheck.py 
new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/checks/I18NCheck.py
--- old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/checks/I18NCheck.py  
2025-09-05 15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/checks/I18NCheck.py  
2025-09-08 09:59:17.000000000 +0200
@@ -70,8 +70,7 @@
 
 class I18NCheck(AbstractCheck):
     def check_binary(self, pkg):
-        files = list(pkg.files.keys())
-        files.sort()
+        files = sorted(pkg.files.keys())
         locales = []                      # list of locales for this packages
         webapp = False
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/checks/InitScriptCheck.py 
new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/checks/InitScriptCheck.py
--- old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/checks/InitScriptCheck.py    
2025-09-05 15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/checks/InitScriptCheck.py    
2025-09-08 09:59:17.000000000 +0200
@@ -42,8 +42,7 @@
         if res2 and res2.group(2) == var:  # infinite loop
             return None
         return substitute_shell_vars(res.group(1), script)
-    else:
-        return None
+    return None
 
 
 def substitute_shell_vars(val, script):
@@ -54,8 +53,7 @@
             value = ''
         return res.group(1) + value + \
             substitute_shell_vars(res.group(3), script)
-    else:
-        return val
+    return val
 
 
 class InitScriptCheck(AbstractCheck):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/checks/ZipCheck.py 
new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/checks/ZipCheck.py
--- old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/checks/ZipCheck.py   
2025-09-05 15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/checks/ZipCheck.py   
2025-09-08 09:59:17.000000000 +0200
@@ -78,7 +78,7 @@
             return
 
         # otherwise check for the hardcoded classpath
-        manifest = jarfile.read(mf).decode()
+        manifest = jarfile.read(mf).decode(errors='replace')
         if classpath_regex.search(manifest):
             self.output.add_info('W', pkg, 'class-path-in-manifest', fname)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/cli.py 
new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/cli.py
--- old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/cli.py       2025-09-05 
15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/cli.py       2025-09-08 
09:59:17.000000000 +0200
@@ -101,7 +101,7 @@
     if options.rpmlintrc:
         if not options.rpmlintrc.exists():
             print_warning(f"User specified rpmlintrc '{options.rpmlintrc}' 
does not exist")
-            exit(2)
+            sys.exit(2)
         # make it a list
         options.rpmlintrc = [options.rpmlintrc]
     else:
@@ -126,7 +126,7 @@
         f_path.update(p_path)
 
     if invalid_path:
-        exit(2)
+        sys.exit(2)
     # convert options to dict
     options_dict = vars(options)
     # use computed rpmfile
@@ -155,7 +155,7 @@
     if not path.exists():
         print_warning(
             f"File or dir with user specified configuration '{string}' does 
not exist")
-        exit(2)
+        sys.exit(2)
 
     if path.is_dir():
         config_paths.extend(path.glob('*.toml'))
@@ -180,8 +180,7 @@
     # TODO: remove once OBS integration is done
     options = process_lint_args(sys.argv[1:] + ['--permissive'])
 
-    lint = Lint(options)
-    sys.exit(lint.run())
+    sys.exit(Lint(options).run())
 
 
 def diff():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/config.py 
new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/config.py
--- old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/config.py    2025-09-05 
15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/config.py    2025-09-08 
09:59:17.000000000 +0200
@@ -123,10 +123,9 @@
         """
         if config_file == self.config_defaults:
             return 0
-        elif not self._is_override_config(config_file):
+        if not self._is_override_config(config_file):
             return 1
-        else:
-            return 2
+        return 2
 
     def load_config(self, config=None):
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/lint.py 
new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/lint.py
--- old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/lint.py      2025-09-05 
15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/lint.py      2025-09-08 
09:59:17.000000000 +0200
@@ -82,6 +82,7 @@
         if self.options['explain']:
             self.print_explanation(self.options['explain'], self.config)
             return retcode
+
         # if there are installed arguments just load them up as extra
         # items to the rpmfile option
         if self.options['installed']:
@@ -240,8 +241,10 @@
         print('')
 
     def validate_installed_packages(self, packages):
+        # Do not run post checks if there are also plain rpm/spec files to 
validate
+        run_post_checks = not bool(self.options['rpmfile'])
         for pkg in packages:
-            self.run_checks(pkg, pkg == packages[-1])
+            self.run_checks(pkg, run_post_checks and pkg == packages[-1])
             self.reset_checks()
 
     def validate_files(self, files):
@@ -275,7 +278,7 @@
 
     def validate_file(self, pname, is_last):
         try:
-            if pname.suffix == '.rpm' or pname.suffix == '.spm':
+            if pname.suffix in ('.rpm', '.spm'):
                 with Pkg(pname, self.config.configuration['ExtractDir'],
                          verbose=self.config.info) as pkg:
                     for k, v in pkg.timers.items():
@@ -288,8 +291,7 @@
             print_warning(f'(none): E: fatal error while reading {pname}: {e}')
             if self.config.info:
                 raise e
-            else:
-                sys.exit(3)
+            sys.exit(3)
 
     def run_checks(self, pkg, is_last):
         spec_checks = isinstance(pkg, FakePkg)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/pkg.py 
new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/pkg.py
--- old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/pkg.py       2025-09-05 
15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/pkg.py       2025-09-08 
09:59:17.000000000 +0200
@@ -89,14 +89,13 @@
     fname = str(fname)
     if gzip_regex.search(fname):
         return gzip
-    elif bz2_regex.search(fname):
+    if bz2_regex.search(fname):
         return bz2
-    elif xz_regex.search(fname):
+    if xz_regex.search(fname):
         return lzma
-    elif zst_regex.search(fname):
+    if zst_regex.search(fname):
         return zstd
-    else:
-        return None
+    return None
 
 
 def is_utf8(fname):
@@ -386,42 +385,42 @@
         pass
 
     def _calc_magic(self, pkgfile):
-        magic = pkgfile.magic
-        if not magic:
+        magic_description = pkgfile.magic
+        if not magic_description:
             if stat.S_ISDIR(pkgfile.mode):
-                magic = 'directory'
+                magic_description = 'directory'
             elif stat.S_ISLNK(pkgfile.mode):
-                magic = "symbolic link to `%s'" % pkgfile.linkto
+                magic_description = "symbolic link to `%s'" % pkgfile.linkto
             elif not pkgfile.size:
-                magic = 'empty'
-        if not magic and not pkgfile.is_ghost and has_magic:
+                magic_description = 'empty'
+        if not magic_description and not pkgfile.is_ghost and has_magic:
             start = time.monotonic()
-            magic = get_magic(pkgfile.path)
+            magic_description = get_magic(pkgfile.path)
             self.timers['libmagic'] += time.monotonic() - start
-        if magic is None or Pkg._magic_from_compressed_re.search(magic):
+        if magic_description is None or 
Pkg._magic_from_compressed_re.search(magic_description):
             # Discard magic from inside compressed files ('file -z')
             # until PkgFile gets decompression support.  We may get
             # such magic strings from package headers already now;
             # for example Fedora's rpmbuild as of F-11's 4.7.1 is
             # patched so it generates them.
-            magic = ''
-        return magic
+            magic_description = ''
+        return magic_description
 
     # internal function to gather dependency info used by the above ones
     def _gather_aux(self, header, xs, nametag, flagstag, versiontag,
                     prereq=None):
-        names = header[nametag]
-        flags = header[flagstag]
         versions = header[versiontag]
 
         if versions:
-            for loop in range(len(versions)):
-                name = byte_to_string(names[loop])
-                evr = stringToVersion(byte_to_string(versions[loop]))
-                if prereq is not None and flags[loop] & PREREQ_FLAG:
-                    prereq.append((name, flags[loop] & (~PREREQ_FLAG), evr))
+            names = header[nametag]
+            flags = header[flagstag]
+            for version, name_bytes, flag in zip(versions, names, flags):
+                name = byte_to_string(name_bytes)
+                evr = stringToVersion(byte_to_string(version))
+                if prereq is not None and flag & PREREQ_FLAG:
+                    prereq.append((name, flag & (~PREREQ_FLAG), evr))
                 else:
-                    xs.append(DepInfo(name, flags[loop], evr))
+                    xs.append(DepInfo(name, flag, evr))
         return xs, prereq
 
     def _gather_dep_info(self):
@@ -519,8 +518,7 @@
         match = regex.search(data)
         if match:
             return data.count('\n', 0, match.start()) + 1
-        else:
-            return None
+        return None
 
 
 class Pkg(AbstractPkg):
@@ -589,20 +587,19 @@
             val = []
         if val == []:
             return None
-        else:
-            # Note that text tags we want to try decoding for real in TagsCheck
-            # such as summary, description and changelog are not here.
-            if key in (rpm.RPMTAG_NAME, rpm.RPMTAG_VERSION, rpm.RPMTAG_RELEASE,
-                       rpm.RPMTAG_ARCH, rpm.RPMTAG_GROUP, rpm.RPMTAG_BUILDHOST,
-                       rpm.RPMTAG_LICENSE, rpm.RPMTAG_HEADERI18NTABLE,
-                       rpm.RPMTAG_PACKAGER, rpm.RPMTAG_SOURCERPM,
-                       rpm.RPMTAG_DISTRIBUTION, rpm.RPMTAG_VENDOR) \
-            or key in (x[0] for x in SCRIPT_TAGS) \
-            or key in (x[1] for x in SCRIPT_TAGS):
-                val = byte_to_string(val)
-                if key == rpm.RPMTAG_GROUP and val == 'Unspecified':
-                    val = None
-            return val
+        # Note that text tags we want to try decoding for real in TagsCheck
+        # such as summary, description and changelog are not here.
+        if key in (rpm.RPMTAG_NAME, rpm.RPMTAG_VERSION, rpm.RPMTAG_RELEASE,
+                   rpm.RPMTAG_ARCH, rpm.RPMTAG_GROUP, rpm.RPMTAG_BUILDHOST,
+                   rpm.RPMTAG_LICENSE, rpm.RPMTAG_HEADERI18NTABLE,
+                   rpm.RPMTAG_PACKAGER, rpm.RPMTAG_SOURCERPM,
+                   rpm.RPMTAG_DISTRIBUTION, rpm.RPMTAG_VENDOR) \
+        or key in (x[0] for x in SCRIPT_TAGS) \
+        or key in (x[1] for x in SCRIPT_TAGS):
+            val = byte_to_string(val)
+            if key == rpm.RPMTAG_GROUP and val == 'Unspecified':
+                val = None
+        return val
 
     # return the name of the directory where the package is extracted
     def dir_name(self):
@@ -747,7 +744,6 @@
 def get_installed_pkgs(name):
     """Get list of installed package objects by name."""
 
-    pkgs = []
     ts = rpm.TransactionSet()
     if re.search(r'[?*]|\[.+\]', name):
         mi = ts.dbMatch()
@@ -755,10 +751,7 @@
     else:
         mi = ts.dbMatch('name', name)
 
-    for hdr in mi:
-        pkgs.append(InstalledPkg(name, hdr))
-
-    return pkgs
+    return [InstalledPkg(name, hdr) for hdr in mi]
 
 
 # Class to provide an API to an installed package
@@ -885,7 +878,7 @@
         """
 
         # files can be just a list
-        if isinstance(files, list) or isinstance(files, tuple):
+        if isinstance(files, (list, tuple)):
             for path in files:
                 self._mock_file(path, {})
         # list of files with attributes and content
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/rpmdiff.py 
new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/rpmdiff.py
--- old/rpmlint-2.7.0+git20250905.7717a72c/rpmlint/rpmdiff.py   2025-09-05 
15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/rpmlint/rpmdiff.py   2025-09-08 
09:59:17.000000000 +0200
@@ -78,8 +78,7 @@
         # compare the files
         old_files_dict = self.__fileIteratorToDict(rpm.files(old))
         new_files_dict = self.__fileIteratorToDict(rpm.files(new))
-        files = list(set(chain(iter(old_files_dict), iter(new_files_dict))))
-        files.sort()
+        files = sorted(set(chain(iter(old_files_dict), iter(new_files_dict))))
 
         for f in files:
             if self._excluded(f):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmlint-2.7.0+git20250905.7717a72c/test/test_cli.py 
new/rpmlint-2.8.0+git20250908.1aa5d478/test/test_cli.py
--- old/rpmlint-2.7.0+git20250905.7717a72c/test/test_cli.py     2025-09-05 
15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/test/test_cli.py     2025-09-08 
09:59:17.000000000 +0200
@@ -1,11 +1,12 @@
 from pathlib import PosixPath
+from unittest.mock import Mock
 
 import pytest
 from rpmlint.cli import process_lint_args
 from rpmlint.config import Config
 from rpmlint.lint import Lint
 
-from Testing import HAS_CHECKBASHISMS, HAS_DASH
+from Testing import HAS_CHECKBASHISMS, HAS_DASH, HAS_RPMDB
 
 
 @pytest.mark.parametrize('test_arguments', [['-c', 
'rpmlint/configs/thisdoesntexist.toml']])
@@ -91,3 +92,18 @@
     lint.run()
     out = lint.output.print_results(lint.output.results, lint.config)
     assert 'more-than-one-%changelog-section' not in out
+
+
[email protected](not HAS_RPMDB, reason='No RPM database present')
[email protected]('args', [
+    ['test/spec/SpecCheck2.spec', 'test/spec/SpecCheck3.spec'],
+    ['-i', 'rpm', 'glibc'],
+    ['test/spec/SpecCheck2.spec', '-i', 'rpm'],
+    ['test/spec/SpecCheck2.spec', 'test/spec/SpecCheck3.spec', '-i', 'rpm', 
'glibc'],
+])
+def test_validate_filters(args):
+    options = process_lint_args(args)
+    lint = Lint(options)
+    lint.output.validate_filters = Mock(wraps=lint.output.validate_filters)
+    lint.run()
+    lint.output.validate_filters.assert_called_once()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/rpmlint-2.7.0+git20250905.7717a72c/test/test_files.py 
new/rpmlint-2.8.0+git20250908.1aa5d478/test/test_files.py
--- old/rpmlint-2.7.0+git20250905.7717a72c/test/test_files.py   2025-09-05 
15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/test/test_files.py   2025-09-08 
09:59:17.000000000 +0200
@@ -153,7 +153,7 @@
 def test_sphinx_inv_files(package, filescheck):
     output, test = filescheck
     test.check(package)
-    assert not len(output.results)
+    assert not output.results
 
 
 @pytest.mark.parametrize('package', [FileChecksPackage])
@@ -257,9 +257,9 @@
     assert 'library-without-ldconfig-postin' in out
     assert 'library-without-ldconfig-postun' in out
     if is_devel:
-        assert ('non-devel-file-in-devel-package' in out)
+        assert 'non-devel-file-in-devel-package' in out
     else:
-        assert ('devel-file-in-non-devel-package' in out)
+        assert 'devel-file-in-non-devel-package' in out
 
 
 @pytest.mark.parametrize('package, files', [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmlint-2.7.0+git20250905.7717a72c/test/test_lint.py 
new/rpmlint-2.8.0+git20250908.1aa5d478/test/test_lint.py
--- old/rpmlint-2.7.0+git20250905.7717a72c/test/test_lint.py    2025-09-05 
15:10:34.000000000 +0200
+++ new/rpmlint-2.8.0+git20250908.1aa5d478/test/test_lint.py    2025-09-08 
09:59:17.000000000 +0200
@@ -392,10 +392,7 @@
 @pytest.mark.no_cover
 def test_run_full_directory(capsys, packages):
     assert packages.is_dir()
-    file_list = []
-    for item in packages.iterdir():
-        if item.is_file():
-            file_list.append(item)
+    file_list = [item for item in packages.iterdir() if item.is_file()]
     number_of_pkgs = len(file_list)
     additional_options = {
         'rpmfile': [packages],

Reply via email to