From ce0aa1024832c8aba406a8feae504be2af8f5477 Mon Sep 17 00:00:00 2001 From: Aditya Bisoi Date: Jun 22 2021 08:48:41 +0000 Subject: Remove leftover deprecated arguments JIRA: RHELCMP-136 Pagure: #380 Signed-off-by: Aditya Bisoi --- diff --git a/etc/rpkg/rpkg.conf b/etc/rpkg/rpkg.conf index c3c71be..941b4b0 100644 --- a/etc/rpkg/rpkg.conf +++ b/etc/rpkg/rpkg.conf @@ -4,8 +4,8 @@ lookaside = http://localhost/repo/pkgs #lookaside_request_params = branch lookasidehash = md5 lookaside_cgi = https://localhost/repo/pkgs/upload.cgi -gitbaseurl = ssh://%(user)s@localhost/%(module)s -anongiturl = git://localhost/%(module)s +gitbaseurl = ssh://%(user)s@localhost/%(repo)s +anongiturl = git://localhost/%(repo)s branchre = f\d$|f\d\d$|el\d$|olpc\d$|master$ kojiprofile = koji build_client = koji diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py index ca4b792..55ec8a1 100644 --- a/pyrpkg/__init__.py +++ b/pyrpkg/__init__.py @@ -2506,9 +2506,7 @@ class Commands(object): elif os.path.isfile(os.path.join(self.path, default_rpmlintconf)): cmd.extend(["-f", os.path.join(self.path, default_rpmlintconf)]) elif os.path.isfile(os.path.join(self.path, ".rpmlint")): - cmd.extend(["-f", os.path.join(self.path, ".rpmlint")]) self.log.warning('.rpmlint file usage as default rpmlint configuration is deprecated ' - 'and will be removed in future version. ' 'Use {0} instead'.format(default_rpmlintconf)) cmd.append(os.path.join(self.path, self.spec)) if os.path.exists(os.path.join(self.path, srpm)): diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py index 19b9356..6c7eb97 100644 --- a/pyrpkg/cli.py +++ b/pyrpkg/cli.py @@ -223,19 +223,7 @@ class cliClient(object): kojiprofile = self.config.get(self.name, 'kojiprofile') if not kojiprofile: - raise rpkgError('Missing kojiprofile to load Koji session. Check ' - 'if there is deprecated kojiconfig instead of ' - 'kojiprofile in the config.') - - if '%(module)s' in items['gitbaseurl']: - self.log.warning( - 'Format argument module is deprecated in gitbaseurl. ' - 'Please use "repo" instead.') - - if '%(module)s' in items['anongiturl']: - self.log.warning( - 'Format argument module is deprecated in anongiturl. ' - 'Please use "repo" instead.') + raise rpkgError('Missing kojiprofile to load Koji session.') # Read line separated list of git excludes patterns git_excludes = [excl diff --git a/tests/test_cli.py b/tests/test_cli.py index 1ccffe5..3f58c57 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1111,18 +1111,18 @@ class TestLint(CliTestCase): lint_config_path = os.path.join(self.cloned_repo_path, 'docpkg.rpmlintrc') open(lint_config_path, 'a').close() - custom_lint_config_path = os.path.join(self.cloned_repo_path, 'custom.rpmlint') + custom_lint_config_path = os.path.join(self.cloned_repo_path, 'custom.rpmlintrc') open(custom_lint_config_path, 'a').close() cli_cmd = ['rpkg', '--name', 'docpkg', '--path', self.cloned_repo_path, - 'lint', '--rpmlintconf', 'custom.rpmlint'] + 'lint', '--rpmlintconf', 'custom.rpmlintrc'] with patch('sys.argv', new=cli_cmd): cli = self.new_cli() cli.lint() rpmlint = ['rpmlint', '-f', custom_lint_config_path, os.path.join(cli.cmd.path, - cli.cmd.spec)] + cli.cmd.spec)] _run_command.assert_called_once_with(rpmlint, shell=True)