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