This commit is contained in:
Tom spot Callaway 2021-08-17 16:16:13 -04:00
parent 4db83c1da5
commit 15be74b1a1
3 changed files with 6 additions and 42 deletions

View File

@ -1,36 +0,0 @@
diff -up rpmlint-2.0.0/rpmlint/pkg.py.672 rpmlint-2.0.0/rpmlint/pkg.py
--- rpmlint-2.0.0/rpmlint/pkg.py.672 2021-07-01 12:07:42.406914041 -0400
+++ rpmlint-2.0.0/rpmlint/pkg.py 2021-07-01 12:08:31.965200930 -0400
@@ -480,8 +480,10 @@ class Pkg(AbstractPkg):
def _extract(self, dirname, verbose):
if not Path(dirname).is_dir():
print_warning('Unable to access dir %s' % dirname)
+ elif dirname == '/':
+ # it is an InstalledPkg
+ pass
else:
- dirname = dirname if dirname != '/' else None
self.__tmpdir = tempfile.TemporaryDirectory(
prefix='rpmlint.%s.' % Path(self.filename).name, dir=dirname
)
diff -up rpmlint-2.0.0/test/test_lint.py.672 rpmlint-2.0.0/test/test_lint.py
--- rpmlint-2.0.0/test/test_lint.py.672 2021-07-01 12:08:44.717274750 -0400
+++ rpmlint-2.0.0/test/test_lint.py 2021-07-01 12:09:40.593598217 -0400
@@ -391,3 +391,17 @@ def test_run_rpmlintrc_single_file(capsy
out, err = capsys.readouterr()
assert not err
assert 'rpmlintrc:' in out
+
+
+
+def test_installed_package(capsys):
+ additional_options = {
+ 'installed': ['bzip2'],
+ 'permissive': True
+ }
+ options = {**options_preset, **additional_options}
+ linter = Lint(options)
+ retcode = linter.run()
+ out, err = capsys.readouterr()
+ assert '1 packages and 0 specfiles checked' in out
+ assert retcode == 0

View File

@ -1,6 +1,6 @@
Name: rpmlint
Version: 2.0.0
Release: 6%{?dist}
Version: 2.1.0
Release: 1%{?dist}
Summary: Tool for checking common errors in RPM packages
License: GPLv2
URL: https://github.com/rpm-software-management/rpmlint
@ -11,8 +11,6 @@ Source2: licenses.toml
Source3: scoring.toml
Source4: users-groups.toml
Source5: warn-on-functions.toml
# https://github.com/rpm-software-management/rpmlint/pull/672
Patch0: rpmlint-2.0.0-PR672.patch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: %{py3_dist setuptools}
@ -39,7 +37,6 @@ and source packages as well as spec files can be checked.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .672
# Don't lint the code or measure coverage in %%check
sed -i -e 's/ --cov=rpmlint//' -e 's/ --flake8//' setup.cfg
@ -65,6 +62,9 @@ cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{buildroot}%{_sysc
%{python3_sitelib}/rpmlint*
%changelog
* Tue Aug 17 2021 Tom Callaway <spot@fedoraproject.org> - 2.1.0-1
- update to 2.1.0
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (rpmlint-2.0.0.tar.gz) = f8f65ec90306bf59c0e31a8a3434477c38b8fb08aa2798b805afd57a506b00110797d514431e69dcb8dde5a54afad8606d8e1c973b8584c47cebed1420d6d61c
SHA512 (rpmlint-2.1.0.tar.gz) = 75df896259b5c340c528357309b2e5e1ce574b7e5e55dff573a1a7808faa3617da799df37e7e65064952a16549225beb16c1e12ba22f2fe4976a69696ed66f46