def METHOD_NAME(self):
    # Reinstall files.
    done = False
    for pkg in self.base.add_remote_rpms(self.opts.filenames, strict=False,
                                         progress=self.base.output.progress):
        try:
            self.base.package_reinstall(pkg)
        except dnf.exceptions.MarkingError:
            logger.info(_('No match for argument: %s'),
                        self.base.output.term.bold(pkg.location))
        else:
            done = True
    # Reinstall packages.
    for pkg_spec in self.opts.pkg_specs + ['@' + x for x in self.opts.grp_specs]:
        try:
            self.base.reinstall(pkg_spec)
        except dnf.exceptions.PackagesNotInstalledError as err:
            for pkg in err.packages:
                logger.info(_('Package %s available, but not installed.'),
                            self.output.term.bold(pkg.name))
                break
            logger.info(_('No match for argument: %s'),
                        self.base.output.term.bold(pkg_spec))
        except dnf.exceptions.PackagesNotAvailableError as err:
            for pkg in err.packages:
                xmsg = ''
                pkgrepo = self.base.history.repo(pkg)
                if pkgrepo:
                    xmsg = _(' (from %s)') % pkgrepo
                msg = _('Installed package %s%s not available.')
                logger.info(msg, self.base.output.term.bold(pkg),
                            xmsg)
        except dnf.exceptions.MarkingError:
            assert False, 'Only the above marking errors are expected.'
        else:
            done = True
    if not done:
        raise dnf.exceptions.Error(_('No packages marked for reinstall.'))