The `fiFromHeader()` method has been removed from rpm-4.19.0, in rpm
commit 742be88cd (Drop the klunky and ugly rpm.fi python binding
finally, 2022-04-08)
It has (apparently) been deprecated since rpm commit f0c3985a7 (Make
fiFromHeader() static inside header-py, deprecate, 2009-09-23).
Use `rpm.files()` instead, which was added in rpm commit 3b086277b (New
rpmfile[s] python bindings, 2013-12-18). This was released in
rpm-4.12.0.
Apparently, using `dsFromHeader()` has been deprecated for a long time.
Using `rpm.ds()` is the preferred method. It has been available for ~10
years, according to rpm commit 8d32255ff (Drop hdr.dsFromHeader() and
hdr.dsOfHeader() methods, 2022-04-08).
Fixes:
/usr/lib/python3.10/site-packages/_pytest/python.py:199: PytestReturnNotNoneWarning: Expected None, but
test/test_filter.py::testpath returned PosixPath('/home/marxin/Programming/rpmlint/test'),
which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`?
* Introducing new file 'pytest.ini' a conf file for pytest
* Completly removing conftest.py file
This commit removes the conftest.py file in the root directory, whose's intention is only to add project path to sys.path when pytest is run wihout any arguments.
Which can be replaced with pytest.ini configuration variables.
changes:
- Added pythonpath variable to pytest.ini file
Reference:
- https://docs.pytest.org/en/7.3.x/reference/reference.html#confval-pythonpath
* Explicitly telling pytest to run tests from directory
When it is not given, it recursively searches for testing directories according to the naming conventions and other rules, which takes time. However when explicilty telling pytest which directory to run tests it directly runs tests, no more searching for directories
Changes:
- In pytest.ini file created a testpaths variable and initialized with test, if in future, if more testing directories comes, just adding the corresponding directories should do the work
Reference:
- https://docs.pytest.org/en/7.3.x/reference/reference.html#confval-testpaths
This patch catch the exception produced when a python dependency have
unexpected characters and do not produces a valid regular expression. It
also introduces a new method to handle the extra dependency declaration,
converting it to a possible python package name like
"module[extra] -> module-extra"
Fix https://github.com/rpm-software-management/rpmlint/issues/1043
Update UsrLibBinaryException in configdefaults.toml to exclude the systemd directory since it is common to install non-binary preset and systemd unit files there.
Right now, we compare two version that are equal, but first part
uses integer and the second one string for epoch version:
('1', '5.5.4'), (1, '5.5.4'). Always leave epoch as integer.
Fixes: #879
This patch add two new warning messages, comparing the requirements
declared by the python package with the requirements found in the rpm
package and tries to detect missing or leftovers dependencies.
Fixes#1018
The change in 7d707f7f (TagsCheck: handle license exception in grouping,
2023-03-03) is insufficient when the exception is on the first item in a
grouping, e.g.:
License: (Apache-2.0 WITH LLVM-exception OR NCSA) AND BSD-3-Clause
Adjust `license_exception_regex` to exclude a leading '(' as well as a
trailing ')'.
In 7d707f7f (TagsCheck: handle license exception in grouping,
2023-03-03), the regex lost the exclusion of space characters. This
isn't immediately noticeable because we strip the strings generated by
the regex before use, but it's better to keep the regex more precise.
Suggested-by: Daniel Garcia Moreno <daniel.garcia@suse.com>