From 4f69bf74ee992824f16711acb693923a5f55618c Mon Sep 17 00:00:00 2001 From: licihua Date: Sat, 25 Dec 2021 16:29:46 +0800 Subject: [PATCH] 1,fix yaml 2,fix check_version result report --- advisors/check_upstream.py | 2 +- advisors/check_version.py | 39 +++++++++++++------- advisors/oa_upgradable.py | 4 +- upstream-info/google-noto-fonts.yaml | 5 +++ upstream-info/jcommon.yaml | 5 +++ upstream-info/jdo-api.yaml | 5 +++ upstream-info/jets3t.yaml | 6 +++ upstream-info/jhighlight.yaml | 5 +++ upstream-info/kronosnet.yaml | 6 +++ upstream-info/libtdb.yaml | 15 ++------ upstream-info/nodejs-es5-ext.yaml | 6 +++ upstream-info/nodejs-faye-websocket.yaml | 5 +++ upstream-info/nodejs-formatio.yaml | 5 +++ upstream-info/nodejs-graceful-readlink.yaml | 5 +++ upstream-info/nodejs-gzip-size.yaml | 5 +++ upstream-info/nodejs-is-builtin-module.yaml | 5 +++ upstream-info/nodejs-lolex.yaml | 5 +++ upstream-info/nodejs-sinon.yaml | 4 ++ upstream-info/nodejs-slide.yaml | 5 +++ upstream-info/nodejs-sntp.yaml | 4 ++ upstream-info/nodejs-source-map.yaml | 4 ++ upstream-info/nodejs-spdx-exceptions.yaml | 5 +++ upstream-info/nodejs-tunnel-agent.yaml | 4 ++ upstream-info/portreserve.yaml | 3 +- upstream-info/proxytoys.yaml | 4 ++ upstream-info/python-scons.yaml | 4 ++ upstream-info/rubygem-redis.yaml | 5 +++ upstream-info/rubygem-slop.yaml | 5 +++ upstream-info/rubygem-sqlite3.yaml | 4 ++ upstream-info/rubygem-ttfunk.yaml | 4 ++ upstream-info/rubygem-turbolinks-source.yaml | 5 +++ upstream-info/rubygem-turbolinks.yaml | 4 ++ upstream-info/rubygem-unf_ext.yaml | 4 ++ upstream-info/soundtouch.yaml | 12 ++---- upstream-info/tycho-extras.yaml | 5 +++ upstream-info/tycho.yaml | 5 +++ 36 files changed, 179 insertions(+), 39 deletions(-) create mode 100644 upstream-info/google-noto-fonts.yaml create mode 100644 upstream-info/jcommon.yaml create mode 100644 upstream-info/jdo-api.yaml create mode 100644 upstream-info/jets3t.yaml create mode 100644 upstream-info/jhighlight.yaml create mode 100644 upstream-info/kronosnet.yaml create mode 100644 upstream-info/nodejs-es5-ext.yaml create mode 100644 upstream-info/nodejs-faye-websocket.yaml create mode 100644 upstream-info/nodejs-formatio.yaml create mode 100644 upstream-info/nodejs-graceful-readlink.yaml create mode 100644 upstream-info/nodejs-gzip-size.yaml create mode 100644 upstream-info/nodejs-is-builtin-module.yaml create mode 100644 upstream-info/nodejs-lolex.yaml create mode 100644 upstream-info/nodejs-sinon.yaml create mode 100644 upstream-info/nodejs-slide.yaml create mode 100644 upstream-info/nodejs-sntp.yaml create mode 100644 upstream-info/nodejs-source-map.yaml create mode 100644 upstream-info/nodejs-spdx-exceptions.yaml create mode 100644 upstream-info/nodejs-tunnel-agent.yaml create mode 100644 upstream-info/proxytoys.yaml create mode 100644 upstream-info/python-scons.yaml create mode 100644 upstream-info/rubygem-redis.yaml create mode 100644 upstream-info/rubygem-slop.yaml create mode 100644 upstream-info/rubygem-sqlite3.yaml create mode 100644 upstream-info/rubygem-ttfunk.yaml create mode 100644 upstream-info/rubygem-turbolinks-source.yaml create mode 100644 upstream-info/rubygem-turbolinks.yaml create mode 100644 upstream-info/rubygem-unf_ext.yaml create mode 100644 upstream-info/tycho-extras.yaml create mode 100644 upstream-info/tycho.yaml diff --git a/advisors/check_upstream.py b/advisors/check_upstream.py index 58fe743c..3aeabea8 100755 --- a/advisors/check_upstream.py +++ b/advisors/check_upstream.py @@ -436,7 +436,7 @@ def check_ftp(info, clean_tag=True): url = yaml2url.yaml2url(info) eprint("{repo} > List ftp directory".format(repo=url)) - resp = get_resp.get(url, headers=headers) + resp = get_resp(url, headers=headers) if not resp: return "" diff --git a/advisors/check_version.py b/advisors/check_version.py index 57e04a25..f46cd95e 100755 --- a/advisors/check_version.py +++ b/advisors/check_version.py @@ -58,25 +58,36 @@ def main(): time.sleep(10) result = main_process(args.push, args.default, check_repo) if result: - print('''INFO: {index} in {total} check {repo} need upgrade \ + if result[1] != result[2]: + print('''INFO: {index} in {total} check {repo} need upgrade \ from {current} to {latest}'''.format(index=index, - total=total, - repo=result[0], - current=result[1], - latest=result[2])) - upgrade_list.append(result) - else: - print('''INFO: {index} in {total} check {repo} not need \ + total=total, + repo=result[0], + current=result[1], + latest=result[2])) + result.append('Y') + upgrade_list.append(result) + else: + result.append('N') + upgrade_list.append(result) + print('''INFO: {index} in {total} check {repo} not need \ upgrade'''.format(index=index, - total=total, - repo=check_repo)) + total=total, + repo=check_repo)) + else: + upgrade_list.append([check_repo, '-', '-', '-']) + print('''INFO: {index} in {total} check {repo} \ +latest version failed.'''.format(index=index, + total=total, + repo=check_repo)) if upgrade_list: - print("The repos listed below need upgrade:") + print("Repo upgrade check result:") for upgrade_repo in upgrade_list: - print("{repo} {current} {latest}".format(repo=upgrade_repo[0], - current=upgrade_repo[1], - latest=upgrade_repo[2])) + print("{repo} {current} {latest} {upgrade}".format(repo=upgrade_repo[0], + current=upgrade_repo[1], + latest=upgrade_repo[2], + upgrade=upgrade_repo[3])) if __name__ == "__main__": diff --git a/advisors/oa_upgradable.py b/advisors/oa_upgradable.py index 80624bd5..6761fea6 100755 --- a/advisors/oa_upgradable.py +++ b/advisors/oa_upgradable.py @@ -187,8 +187,8 @@ If you think this is not proper issue, Please visit https://gitee.com/openeuler/ Issues and feedbacks are welcome.""".format(repo=repo, ver=ver_rec.latest_version, cur_ver=cur_version)) - return repo, cur_version, ver_rec.latest_version - return None + return [repo, cur_version, ver_rec.latest_version] + if __name__ == "__main__": diff --git a/upstream-info/google-noto-fonts.yaml b/upstream-info/google-noto-fonts.yaml new file mode 100644 index 00000000..1f8a3204 --- /dev/null +++ b/upstream-info/google-noto-fonts.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: googlefonts/noto-fonts +tag_prefix: "^v" +separator: "." +url: https://github.com/googlefonts/noto-fonts.git diff --git a/upstream-info/jcommon.yaml b/upstream-info/jcommon.yaml new file mode 100644 index 00000000..5ee00aba --- /dev/null +++ b/upstream-info/jcommon.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: jfree/jcommon +tag_prefix: "^v" +separator: "." +git_url: https://github.com/jfree/jcommon.git diff --git a/upstream-info/jdo-api.yaml b/upstream-info/jdo-api.yaml new file mode 100644 index 00000000..78ffb2c5 --- /dev/null +++ b/upstream-info/jdo-api.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: apache/db-jdo +tag_prefix: "^v" +separator: "." +git_url: https://github.com/apache/db-jdo.git diff --git a/upstream-info/jets3t.yaml b/upstream-info/jets3t.yaml new file mode 100644 index 00000000..7d95c1ad --- /dev/null +++ b/upstream-info/jets3t.yaml @@ -0,0 +1,6 @@ +version_control: github +src_repo: iterate-ch/jets3t +tag_prefix: "^Release-" +separator: "." +git_url: https://github.com/iterate-ch/jets3t.git + diff --git a/upstream-info/jhighlight.yaml b/upstream-info/jhighlight.yaml new file mode 100644 index 00000000..6e4c92a9 --- /dev/null +++ b/upstream-info/jhighlight.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: codelibs/jhighlight +tag_prefix: "^jhighlight-" +separator: "." +git_url: https://github.com/codelibs/jhighlight.git diff --git a/upstream-info/kronosnet.yaml b/upstream-info/kronosnet.yaml new file mode 100644 index 00000000..6a2303ff --- /dev/null +++ b/upstream-info/kronosnet.yaml @@ -0,0 +1,6 @@ +version_control: github +src_repo: kronosnet +src_repo: kronosnet/kronosnet +tag_prefix: "^v" +separator: "." +url: https://github.com/kronosnet/kronosnet.git diff --git a/upstream-info/libtdb.yaml b/upstream-info/libtdb.yaml index bc78ec3d..720018e3 100644 --- a/upstream-info/libtdb.yaml +++ b/upstream-info/libtdb.yaml @@ -1,15 +1,6 @@ --- version_control: github -src_repo: nkadel/libtdb-1.4.x-srpm -tag_prefix: "^v" +src_repo: samba-team/samba +tag_prefix: "^tdb-" separator: "." -git_url: https://github.com/nkadel/libtdb-1.4.x-srpm.git -git_tag: -- 2020-02-02 v1.4.3-0 -- 2019-08-21 v1.4.2-0 -- 2019-04-18 v1.3.18-0.2 -- 2018-11-25 v1.3.16-0.1 -- 2018-08-10 v1.3.16-0 -- 2018-07-09 v1.3.15-0 -- 2013-07-05 v1.2.12-0.1 -- 2013-02-20 v1.2.11-1 +git_url: https://github.com/samba-team/samba.git diff --git a/upstream-info/nodejs-es5-ext.yaml b/upstream-info/nodejs-es5-ext.yaml new file mode 100644 index 00000000..7ad8653a --- /dev/null +++ b/upstream-info/nodejs-es5-ext.yaml @@ -0,0 +1,6 @@ +version_control: github +src_repo: medikoo/es5-ext +tag_prefix: "^v" +separator: "." +git_url: https://github.com/medikoo/es5-ext.git + diff --git a/upstream-info/nodejs-faye-websocket.yaml b/upstream-info/nodejs-faye-websocket.yaml new file mode 100644 index 00000000..2764b017 --- /dev/null +++ b/upstream-info/nodejs-faye-websocket.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: faye/faye-websocket-node +tag_prefix: "" +separator: "." +git_url: https://github.com/faye/faye-websocket-node.git diff --git a/upstream-info/nodejs-formatio.yaml b/upstream-info/nodejs-formatio.yaml new file mode 100644 index 00000000..13e83f50 --- /dev/null +++ b/upstream-info/nodejs-formatio.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: sinonjs/formatio +tag_prefix: "^v" +separator: "." +git_url: https://github.com/sinonjs/formatio.git diff --git a/upstream-info/nodejs-graceful-readlink.yaml b/upstream-info/nodejs-graceful-readlink.yaml new file mode 100644 index 00000000..cce33340 --- /dev/null +++ b/upstream-info/nodejs-graceful-readlink.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: zhiyelee/graceful-readlink +tag_prefix: "^" +separator: "." +git_url: https://github.com/zhiyelee/graceful-readlink.git diff --git a/upstream-info/nodejs-gzip-size.yaml b/upstream-info/nodejs-gzip-size.yaml new file mode 100644 index 00000000..03b01574 --- /dev/null +++ b/upstream-info/nodejs-gzip-size.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: sindresorhus/gzip-size +tag_prefix: "^v" +separator: "." +git_url: https://github.com/sindresorhus/gzip-size.git diff --git a/upstream-info/nodejs-is-builtin-module.yaml b/upstream-info/nodejs-is-builtin-module.yaml new file mode 100644 index 00000000..7aad871a --- /dev/null +++ b/upstream-info/nodejs-is-builtin-module.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: sindresorhus/is-builtin-module +tag_prefix: "^v" +separator: "." +git_url: https://github.com/sindresorhus/is-builtin-module.git diff --git a/upstream-info/nodejs-lolex.yaml b/upstream-info/nodejs-lolex.yaml new file mode 100644 index 00000000..4906daac --- /dev/null +++ b/upstream-info/nodejs-lolex.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: sinonjs/fake-timers +tag_prefix: "^v" +separator: "." + diff --git a/upstream-info/nodejs-sinon.yaml b/upstream-info/nodejs-sinon.yaml new file mode 100644 index 00000000..dd707369 --- /dev/null +++ b/upstream-info/nodejs-sinon.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: cjohansen/Sinon.JS +tag_prefix: "^v" +separator: "." diff --git a/upstream-info/nodejs-slide.yaml b/upstream-info/nodejs-slide.yaml new file mode 100644 index 00000000..0a4467e4 --- /dev/null +++ b/upstream-info/nodejs-slide.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: isaacs/slide-flow-control +tag_prefix: "^v" +separator: "." + diff --git a/upstream-info/nodejs-sntp.yaml b/upstream-info/nodejs-sntp.yaml new file mode 100644 index 00000000..bc044d22 --- /dev/null +++ b/upstream-info/nodejs-sntp.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: hueniverse/sntp +tag_prefix: "^v" +separator: "." diff --git a/upstream-info/nodejs-source-map.yaml b/upstream-info/nodejs-source-map.yaml new file mode 100644 index 00000000..feb0b647 --- /dev/null +++ b/upstream-info/nodejs-source-map.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: mozilla/source-map +tag_prefix: "" +separator: "." diff --git a/upstream-info/nodejs-spdx-exceptions.yaml b/upstream-info/nodejs-spdx-exceptions.yaml new file mode 100644 index 00000000..b105b531 --- /dev/null +++ b/upstream-info/nodejs-spdx-exceptions.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: jslicense/spdx-exceptions.json +tag_prefix: "^v" +separator: "." + diff --git a/upstream-info/nodejs-tunnel-agent.yaml b/upstream-info/nodejs-tunnel-agent.yaml new file mode 100644 index 00000000..bbee6833 --- /dev/null +++ b/upstream-info/nodejs-tunnel-agent.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: request/tunnel-agent +tag_prefix: "^v" +separator: "." diff --git a/upstream-info/portreserve.yaml b/upstream-info/portreserve.yaml index 12e95ea8..5a8a21ac 100644 --- a/upstream-info/portreserve.yaml +++ b/upstream-info/portreserve.yaml @@ -1,7 +1,6 @@ ---- version_control: git src_repo: https://pagure.io/portreserve.git -tag_prefix: "^" +tag_prefix: "" separator: "." git_url: https://pagure.io/portreserve.git git_tag: diff --git a/upstream-info/proxytoys.yaml b/upstream-info/proxytoys.yaml new file mode 100644 index 00000000..805f32bd --- /dev/null +++ b/upstream-info/proxytoys.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: proxytoys/proxytoys +tag_prefix: "" +separator: "." diff --git a/upstream-info/python-scons.yaml b/upstream-info/python-scons.yaml new file mode 100644 index 00000000..88ab07d3 --- /dev/null +++ b/upstream-info/python-scons.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: SCons/scons +tag_prefix: ^v +separator: . diff --git a/upstream-info/rubygem-redis.yaml b/upstream-info/rubygem-redis.yaml new file mode 100644 index 00000000..c3bff7c2 --- /dev/null +++ b/upstream-info/rubygem-redis.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: redis/redis-rb +tag_prefix: "^v" +separator: "." +git_url: https://github.com/redis/redis-rb.git diff --git a/upstream-info/rubygem-slop.yaml b/upstream-info/rubygem-slop.yaml new file mode 100644 index 00000000..b26b1e3a --- /dev/null +++ b/upstream-info/rubygem-slop.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: leejarvis/slop +tag_prefix: "^v" +separator: "." + diff --git a/upstream-info/rubygem-sqlite3.yaml b/upstream-info/rubygem-sqlite3.yaml new file mode 100644 index 00000000..bbd7ffed --- /dev/null +++ b/upstream-info/rubygem-sqlite3.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: sparklemotion/sqlite3-ruby +tag_prefix: "^v" +separator: "." diff --git a/upstream-info/rubygem-ttfunk.yaml b/upstream-info/rubygem-ttfunk.yaml new file mode 100644 index 00000000..c6e111d6 --- /dev/null +++ b/upstream-info/rubygem-ttfunk.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: prawnpdf/ttfunk +tag_prefix: "" +separator: "." diff --git a/upstream-info/rubygem-turbolinks-source.yaml b/upstream-info/rubygem-turbolinks-source.yaml new file mode 100644 index 00000000..a786ccd7 --- /dev/null +++ b/upstream-info/rubygem-turbolinks-source.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: turbolinks/turbolinks-source-gem +tag_prefix: "^v" +separator: "." + diff --git a/upstream-info/rubygem-turbolinks.yaml b/upstream-info/rubygem-turbolinks.yaml new file mode 100644 index 00000000..5b366de3 --- /dev/null +++ b/upstream-info/rubygem-turbolinks.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: turbolinks/turbolinks +tag_prefix: "^v" +separator: "." diff --git a/upstream-info/rubygem-unf_ext.yaml b/upstream-info/rubygem-unf_ext.yaml new file mode 100644 index 00000000..a66c15cc --- /dev/null +++ b/upstream-info/rubygem-unf_ext.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: knu/ruby-unf_ext +tag_prefix: "^v" +separator: "." diff --git a/upstream-info/soundtouch.yaml b/upstream-info/soundtouch.yaml index a6ed8e11..bd0024d9 100644 --- a/upstream-info/soundtouch.yaml +++ b/upstream-info/soundtouch.yaml @@ -1,9 +1,5 @@ ---- version_control: git -src_repo: https://gitlab.com/soundtouch/soundtouch.git -tag_prefix: "^" -separator: "." -git_url: https://gitlab.com/soundtouch/soundtouch.git -git_tag: -- 2018-12-02 2.1.2 -- 2018-11-14 2.1.1 +src_repo: https://codeberg.org/soundtouch/soundtouch.git +tag_prefix: "" +separator: . +git_url: https://codeberg.org/soundtouch/soundtouch.git diff --git a/upstream-info/tycho-extras.yaml b/upstream-info/tycho-extras.yaml new file mode 100644 index 00000000..476cd4cb --- /dev/null +++ b/upstream-info/tycho-extras.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: eclipse/tycho +tag_prefix: "^tycho-" +separator: "." + diff --git a/upstream-info/tycho.yaml b/upstream-info/tycho.yaml new file mode 100644 index 00000000..e078fd17 --- /dev/null +++ b/upstream-info/tycho.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: eclipse/tycho +tag_prefix: "^tycho-" +separator: "." +git_url: https://github.com/eclipse/tycho.git -- Gitee