public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: repoman/lib/repoman/tests/simple/, repoman/lib/repoman/
@ 2018-09-19 17:19 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2018-09-19 17:19 UTC (permalink / raw
  To: gentoo-commits

commit:     2e6b40509dfffe8dd028dcc5d725a0ac9188d8b7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 18 08:57:08 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Sep 19 17:18:41 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=2e6b4050

repoman: Allow copyright updates for 'Gentoo Authors'

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 repoman/lib/repoman/copyrights.py               |  4 ++--
 repoman/lib/repoman/tests/simple/test_simple.py | 10 ++++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/repoman/lib/repoman/copyrights.py b/repoman/lib/repoman/copyrights.py
index 94257c942..25627b3fc 100644
--- a/repoman/lib/repoman/copyrights.py
+++ b/repoman/lib/repoman/copyrights.py
@@ -15,9 +15,9 @@ from portage import util
 
 
 _copyright_re1 = \
-	re.compile(br'^(# Copyright \d\d\d\d)-\d\d\d\d( Gentoo Foundation)\b')
+	re.compile(br'^(# Copyright \d\d\d\d)-\d\d\d\d( Gentoo (Foundation|Authors))\b')
 _copyright_re2 = \
-	re.compile(br'^(# Copyright )(\d\d\d\d)( Gentoo Foundation)\b')
+	re.compile(br'^(# Copyright )(\d\d\d\d)( Gentoo (Foundation|Authors))\b')
 
 
 class _copyright_repl(object):

diff --git a/repoman/lib/repoman/tests/simple/test_simple.py b/repoman/lib/repoman/tests/simple/test_simple.py
index 3d7a70ad0..351dde2c7 100644
--- a/repoman/lib/repoman/tests/simple/test_simple.py
+++ b/repoman/lib/repoman/tests/simple/test_simple.py
@@ -35,6 +35,16 @@ class SimpleRepomanTestCase(TestCase):
 				'# Copyright 1999 Gentoo Foundation; Distributed under the GPL v2',
 				'# Copyright 1999 Gentoo Foundation; Distributed under the GPL v2',
 			),
+			(
+				'2018',
+				'# Copyright 1999-2008 Gentoo Authors; Distributed under the GPL v2',
+				'# Copyright 1999-2018 Gentoo Authors; Distributed under the GPL v2',
+			),
+			(
+				'2018',
+				'# Copyright 2017 Gentoo Authors; Distributed under the GPL v2',
+				'# Copyright 2017-2018 Gentoo Authors; Distributed under the GPL v2',
+			),
 		)
 
 		for year, before, after in test_cases:


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/portage:master commit in: repoman/lib/repoman/tests/simple/, repoman/lib/repoman/
@ 2021-04-04 11:30 Zac Medico
  0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2021-04-04 11:30 UTC (permalink / raw
  To: gentoo-commits

commit:     e29177fcd2950199afa4f83673c0771afb261123
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  4 11:18:01 2021 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Apr  4 11:29:40 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=e29177fc

repoman: fix --version TypeError

Bug: https://bugs.gentoo.org/779967
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 repoman/lib/repoman/main.py                     | 2 +-
 repoman/lib/repoman/tests/simple/test_simple.py | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/repoman/lib/repoman/main.py b/repoman/lib/repoman/main.py
index 78be31df3..d84abf3ae 100755
--- a/repoman/lib/repoman/main.py
+++ b/repoman/lib/repoman/main.py
@@ -82,7 +82,7 @@ def _repoman_init(argv):
 
 	if options.version:
 		print("Repoman", VERSION, "(portage-%s)" % portage.VERSION)
-		return _repoman_main_vars(exitcode=0)
+		return _repoman_main_vars(None, 0, None, None, None, None, None)
 
 	logger = logging.getLogger()
 

diff --git a/repoman/lib/repoman/tests/simple/test_simple.py b/repoman/lib/repoman/tests/simple/test_simple.py
index 60c62acc1..c4a864ff8 100644
--- a/repoman/lib/repoman/tests/simple/test_simple.py
+++ b/repoman/lib/repoman/tests/simple/test_simple.py
@@ -66,7 +66,7 @@ class RepomanRun(types.SimpleNamespace):
 			args = ["-vvvv"] + args
 		repoman_vars = _repoman_init(["repoman"] + args)
 		if repoman_vars.exitcode is not None:
-			return repoman_vars.exitcode
+			return {"returncode": repoman_vars.exitcode}
 		result = _repoman_scan(*repoman_vars)
 		returncode = _handle_result(*repoman_vars, result)
 		qawarnings = repoman_vars.vcs_settings.qatracker.qawarnings
@@ -313,6 +313,7 @@ pkg_preinst() {
 		}
 
 		git_test = (
+			("", RepomanRun(args=["--version"])),
 			("", RepomanRun(args=["manifest"])),
 			("", git_cmd + ("config", "--global", "user.name", committer_name,)),
 			("", git_cmd + ("config", "--global", "user.email", committer_email,)),


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-04 11:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-19 17:19 [gentoo-commits] proj/portage:master commit in: repoman/lib/repoman/tests/simple/, repoman/lib/repoman/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2021-04-04 11:30 Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox