diff --git a/advisors/match_patches.py b/advisors/match_patches.py index c8019b7c7de107720ad562ca8ac27e81482837d6..084faf101810fa8b5eb144deb17d2a3281ad57ca 100755 --- a/advisors/match_patches.py +++ b/advisors/match_patches.py @@ -25,7 +25,6 @@ import yaml from advisors import gitee from advisors import yaml2url from advisors import oa_upgradable -from advisors import simple_update_robot def _clone_repo(pkg_info): @@ -130,25 +129,3 @@ def patches_match(gt_api, pkg, c_ver, u_ver): patch_match[file_name] = "all" print(patch_match) return patch_match - - -def main(): - """ - Main entrance for command line - """ - pars = argparse.ArgumentParser() - pars.add_argument("pkg", type=str, help="The package to be matched.") - pars.add_argument("branch", type=str, help="Branch to be matched.") - pars.add_argument("cur_ver", type=str, help="Current version of package.") - pars.add_argument("up_ver", type=str, help="Upgrade version of package.") - args = pars.parse_args() - - user_gitee = gitee.Gitee() - simple_update_robot.fork_clone_repo(user_gitee, args.pkg, args.branch) - os.chdir(args.pkg) - patches_match(user_gitee, args.pkg, args.cur_ver, args.up_ver) - os.chdir(os.pardir) - - -if __name__ == "__main__": - main() diff --git a/command/match_patches b/command/match_patches deleted file mode 100644 index a6bb103ceae05147f26daed80fbb7ec3995ade15..0000000000000000000000000000000000000000 --- a/command/match_patches +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python3 - -import sys -import signal -from signal import SIG_DFL - -try: - def sig_handler(signum, frame): - print('Exit command mode') - sys.exit(0) - - signal.signal(signal.SIGINT, sig_handler) - signal.signal(signal.SIGPIPE, SIG_DFL) -except: - pass - -from advisors.match_patches import main - - -if __name__ == '__main__': - try: - main() - except Exception as error: - print("WARNING: Command execution error") - print(error.message) diff --git a/openEuler-Advisor.spec b/openEuler-Advisor.spec index 323a2f184b4f42489fc3bb435a86df6ce37361d5..74fb82771c467c42a28f291ae1a2f63f5d0a56ce 100644 --- a/openEuler-Advisor.spec +++ b/openEuler-Advisor.spec @@ -35,7 +35,6 @@ py.test-%{python3_version} -vv tests || : %{python3_sitelib}/* %attr(0755,root,root) %{_bindir}/simple_update_robot %attr(0755,root,root) %{_bindir}/oa_upgradable -%attr(0755,root,root) %{_bindir}/match_patches %attr(0755,root,root) %{_bindir}/check_missing_specs %attr(0755,root,root) %{_bindir}/check_repeated_repo %attr(0755,root,root) %{_bindir}/check_source_url diff --git a/setup.py b/setup.py index 56acfa497fbc839020efecbd3f39e8890d93d984..ce0ce79429f589ca278e6bb90d1ec0dc91e14954 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,6 @@ setup( data_files=[ ('/usr/bin/', ['command/simple_update_robot']), ('/usr/bin/', ['command/oa_upgradable']), - ('/usr/bin/', ['command/match_patches']), ('/usr/bin/', ['command/check_missing_specs']), ('/usr/bin/', ['command/check_repeated_repo']), ('/usr/bin/', ['command/check_source_url']),