* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2016-05-15 23:51 Brian Dolbec
0 siblings, 0 replies; 22+ messages in thread
From: Brian Dolbec @ 2016-05-15 23:51 UTC (permalink / raw
To: gentoo-commits
commit: 2c45b9b37355ee3684a4a6cf732e08b16a5398cb
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun May 15 02:23:46 2016 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun May 15 18:27:18 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2c45b9b3
repoman/metadata.py: Add the local test path to metadata.xsd search
This fixes an issue in the travis testing where it tries to download
the metadata.xsd which fails.
repoman/pym/repoman/metadata.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/repoman/pym/repoman/metadata.py b/repoman/pym/repoman/metadata.py
index a9ad3e8..77174f6 100644
--- a/repoman/pym/repoman/metadata.py
+++ b/repoman/pym/repoman/metadata.py
@@ -108,7 +108,11 @@ def get_metadata_xsd(repo_settings):
@returns: path to the metadata.xsd file
'''
metadata_xsd = None
- for path in reversed(repo_settings.repo_config.eclass_db.porttrees):
+ paths = list(repo_settings.repo_config.eclass_db.porttrees)
+ paths.reverse()
+ # add the test copy
+ paths.append("/usr/lib/portage/cnf/")
+ for path in paths:
path = os.path.join(path, 'metadata/xml-schema/metadata.xsd')
if os.path.exists(path):
metadata_xsd = path
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2016-06-24 6:38 Zac Medico
0 siblings, 0 replies; 22+ messages in thread
From: Zac Medico @ 2016-06-24 6:38 UTC (permalink / raw
To: gentoo-commits
commit: ef33db45a0c1d462411d4ced1857a322c0ab28f6
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 24 06:22:41 2016 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Jun 24 06:29:07 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ef33db45
repoman: skip QA checks in manifest mode (bug 586864)
The relevent Scanner loop control logic broke in commit 4062c69dc27a
because it was relying on the return value from the Manifest module's
"check" method.
Fixes: 4062c69dc27a ("repoman: Move manifest generation to modules/commit/manifest.py")
X-Gentoo-Bug: 586864
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=586864
repoman/pym/repoman/scanner.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/repoman/pym/repoman/scanner.py b/repoman/pym/repoman/scanner.py
index d7cd81f..8999751 100644
--- a/repoman/pym/repoman/scanner.py
+++ b/repoman/pym/repoman/scanner.py
@@ -294,6 +294,8 @@ class Scanner(object):
if self.generate_manifest:
manifest.Manifest(**self.kwargs).update_manifest(checkdir)
+ if self.options.mode == 'manifest':
+ continue
checkdirlist = os.listdir(checkdir)
dynamic_data = {
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2016-06-28 15:34 Mike Frysinger
0 siblings, 0 replies; 22+ messages in thread
From: Mike Frysinger @ 2016-06-28 15:34 UTC (permalink / raw
To: gentoo-commits
commit: dce4fcbe9033ae6fff246bed8393771819f4b269
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 28 15:33:49 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Jun 28 15:34:40 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=dce4fcbe
repoman: use https to fetch metadata.xsd
repoman/pym/repoman/metadata.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/repoman/pym/repoman/metadata.py b/repoman/pym/repoman/metadata.py
index 77174f6..53bda63 100644
--- a/repoman/pym/repoman/metadata.py
+++ b/repoman/pym/repoman/metadata.py
@@ -27,8 +27,10 @@ if sys.hexversion >= 0x3000000:
if sys.hexversion >= 0x3000000:
basestring = str
+# Note: This URI is hardcoded in all metadata.xml files. We can't
+# change it without updating all the xml files in the tree.
metadata_dtd_uri = 'http://www.gentoo.org/dtd/metadata.dtd'
-metadata_xsd_uri = 'http://www.gentoo.org/xml-schema/metadata.xsd'
+metadata_xsd_uri = 'https://www.gentoo.org/xml-schema/metadata.xsd'
# force refetch if the local copy creation time is older than this
metadata_xsd_ctime_interval = 60 * 60 * 24 * 7 # 7 days
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2016-06-30 5:54 Michał Górny
0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2016-06-30 5:54 UTC (permalink / raw
To: gentoo-commits
commit: 2072c512452e89ccb175103ea839eb4cbe64d617
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 28 18:29:46 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 05:54:21 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2072c512
repoman: Make LIVEVCS.* checks fatal
Make LIVEVCS.* checks fatal to prevent people from committing ebuilds
using live eclasses instead of package.masking them afterwards by QA.
Acked-by: Zac Medico <zmedico <AT> gentoo.org>
repoman/pym/repoman/qa_data.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/repoman/pym/repoman/qa_data.py b/repoman/pym/repoman/qa_data.py
index 48ab389..738368e 100644
--- a/repoman/pym/repoman/qa_data.py
+++ b/repoman/pym/repoman/qa_data.py
@@ -270,8 +270,6 @@ qawarnings = set((
"repo.eapi.deprecated",
"usage.obsolete",
"upstream.workaround",
- "LIVEVCS.stable",
- "LIVEVCS.unmasked",
"IUSE.rubydeprecated",
))
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2016-09-15 18:46 Brian Dolbec
0 siblings, 0 replies; 22+ messages in thread
From: Brian Dolbec @ 2016-09-15 18:46 UTC (permalink / raw
To: gentoo-commits
commit: 559fe9736b1d5426948a0e94b5e3602631de831b
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 15 17:36:31 2016 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Sep 15 18:45:51 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=559fe973
repoman/main.py: Fix commitmessage assignment not being done.
With commitmessage only being None, the if block where it was used was irrelevant.
This now will correctly make use of a passed in commit message in the if block.
repoman/pym/repoman/main.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/repoman/pym/repoman/main.py b/repoman/pym/repoman/main.py
index 2009a44..ad213e3 100755
--- a/repoman/pym/repoman/main.py
+++ b/repoman/pym/repoman/main.py
@@ -116,8 +116,6 @@ def repoman_main(argv):
vcs_settings, mydir, env)
scanner.scan_pkgs(can_force)
- commitmessage = None
-
if options.if_modified == "y" and len(scanner.effective_scanlist) < 1:
logging.warning("--if-modified is enabled, but no modified packages were found!")
@@ -145,6 +143,14 @@ def repoman_main(argv):
(result['warn'] and not (options.quiet or options.mode == "scan")):
result['full'] = 0
+ commitmessage = None
+ if options.commitmsg:
+ commitmessage = options.commitmsg
+ elif options.commitmsgfile:
+ # we don't need the actual text of the commit message here
+ # the filename will do for the next code block
+ commitmessage = options.commitmsgfile
+
# Save QA output so that it can be conveniently displayed
# in $EDITOR while the user creates a commit message.
# Otherwise, the user would not be able to see this output
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2016-09-15 18:46 Brian Dolbec
0 siblings, 0 replies; 22+ messages in thread
From: Brian Dolbec @ 2016-09-15 18:46 UTC (permalink / raw
To: gentoo-commits
commit: 3a4d6665190281bc18650196e972c798be80c857
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 15 18:45:04 2016 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Sep 15 18:46:04 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3a4d6665
repoman/actions.py: Add cat/pkg: substtution in the commitsgfile text
Split out the code for msg_prefix().
If the commit message text starts with "cat/pkg: " or "CAT/PKG: ", then it will substitute
that text for the real cat/pkg string deteermined by the msg_prefix().
This allows for a templated commit message that is re-used for several/many packages.
repoman/pym/repoman/actions.py | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py
index 16d602a..0534c29 100644
--- a/repoman/pym/repoman/actions.py
+++ b/repoman/pym/repoman/actions.py
@@ -108,6 +108,9 @@ class Actions(object):
" --commitmsgfile='%s'\n" % self.options.commitmsgfile)
else:
raise
+ if commitmessage[:9] in ("cat/pkg: ", "CAT/PKG: "):
+ commitmessage = self.msg_prefix() + commitmessage[9:]
+
if not commitmessage or not commitmessage.strip():
commitmessage = self.get_new_commit_message(qa_output)
@@ -516,12 +519,14 @@ class Actions(object):
portage.writemsg("!!! Disabled FEATURES='sign'\n")
self.repo_settings.sign_manifests = False
-
- def get_new_commit_message(self, qa_output):
- msg_prefix = ""
+ def msg_prefix(self):
+ prefix = ""
if self.scanner.repolevel > 1:
- msg_prefix = "/".join(self.scanner.reposplit[1:]) + ": "
+ prefix = "/".join(self.scanner.reposplit[1:]) + ": "
+ return prefix
+ def get_new_commit_message(self, qa_output):
+ msg_prefix = self.msg_prefix()
try:
editor = os.environ.get("EDITOR")
if editor and utilities.editor_is_executable(editor):
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2016-10-11 18:54 Brian Dolbec
0 siblings, 0 replies; 22+ messages in thread
From: Brian Dolbec @ 2016-10-11 18:54 UTC (permalink / raw
To: gentoo-commits
commit: 8adb8d6cc14a2fdbdc6640c8d8ecc0e7da2443c9
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 19 04:15:53 2016 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 18:52:13 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8adb8d6c
repoman/main.py: Fix version output string to say Repoman
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>
repoman/pym/repoman/main.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/repoman/pym/repoman/main.py b/repoman/pym/repoman/main.py
index ad213e3..2c9445a 100755
--- a/repoman/pym/repoman/main.py
+++ b/repoman/pym/repoman/main.py
@@ -62,7 +62,7 @@ def repoman_main(argv):
sys.argv, qahelp, repoman_settings.get("REPOMAN_DEFAULT_OPTS", ""))
if options.version:
- print("Portage", portage.VERSION)
+ print("Repoman", portage.VERSION)
sys.exit(0)
logger = logging.getLogger()
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2016-12-06 3:54 Brian Dolbec
0 siblings, 0 replies; 22+ messages in thread
From: Brian Dolbec @ 2016-12-06 3:54 UTC (permalink / raw
To: gentoo-commits
commit: 006b168c1bb6f5b6706a3af42e53764cffafd610
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 5 19:27:15 2016 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Dec 5 20:35:21 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=006b168c
repoman: Fix versioning system
Repoman had been showing the portage version. Which was the same for the last release.
Copy the live versions code from portage, Modify as needed to get the correct tag info.
Add portage version to --version output.
repoman/pym/repoman/__init__.py | 70 +++++++++++++++++++++++++++++++++++++++++
repoman/pym/repoman/main.py | 3 +-
2 files changed, 72 insertions(+), 1 deletion(-)
diff --git a/repoman/pym/repoman/__init__.py b/repoman/pym/repoman/__init__.py
index 5f0f9f8..780b611 100644
--- a/repoman/pym/repoman/__init__.py
+++ b/repoman/pym/repoman/__init__.py
@@ -1,6 +1,76 @@
import os.path
+import subprocess
+import sys
+import time
+
+try:
+ import portage.const
+ import portage.proxy as proxy
+ from portage import _encodings, _shell_quote, _unicode_encode, _unicode_decode
+ from portage.const import PORTAGE_BASE_PATH, BASH_BINARY
+except ImportError as e:
+ sys.stderr.write("\n\n")
+ sys.stderr.write("!!! Failed to complete portage imports. There are internal modules for\n")
+ sys.stderr.write("!!! portage and failure here indicates that you have a problem with your\n")
+ sys.stderr.write("!!! installation of portage. Please try a rescue portage located in the\n")
+ sys.stderr.write("!!! portage tree under '/usr/portage/sys-apps/portage/files/' (default).\n")
+ sys.stderr.write("!!! There is a README.RESCUE file that details the steps required to perform\n")
+ sys.stderr.write("!!! a recovery of portage.\n")
+ sys.stderr.write(" "+str(e)+"\n\n")
+ raise
+
+
+VERSION = "HEAD"
REPOMAN_BASE_PATH = os.path.join(os.sep, os.sep.join(os.path.realpath(__file__.rstrip("co")).split(os.sep)[:-3]))
_not_installed = os.path.isfile(os.path.join(REPOMAN_BASE_PATH, ".repoman_not_installed"))
+
+if VERSION == 'HEAD':
+ class _LazyVersion(proxy.objectproxy.ObjectProxy):
+ def _get_target(self):
+ global VERSION
+ if VERSION is not self:
+ return VERSION
+ if os.path.isdir(os.path.join(PORTAGE_BASE_PATH, '.git')):
+ encoding = _encodings['fs']
+ cmd = [BASH_BINARY, "-c", ("cd %s ; git describe --match 'repoman-*' || exit $? ; " + \
+ "if [ -n \"`git diff-index --name-only --diff-filter=M HEAD`\" ] ; " + \
+ "then echo modified ; git rev-list --format=%%ct -n 1 HEAD ; fi ; " + \
+ "exit 0") % _shell_quote(PORTAGE_BASE_PATH)]
+ cmd = [_unicode_encode(x, encoding=encoding, errors='strict')
+ for x in cmd]
+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+ output = _unicode_decode(proc.communicate()[0], encoding=encoding)
+ status = proc.wait()
+ if os.WIFEXITED(status) and os.WEXITSTATUS(status) == os.EX_OK:
+ output_lines = output.splitlines()
+ if output_lines:
+ version_split = output_lines[0].split('-')
+ if len(version_split) > 1:
+ VERSION = version_split[1]
+ patchlevel = False
+ if len(version_split) > 2:
+ patchlevel = True
+ VERSION = "%s_p%s" % (VERSION, version_split[2])
+ if len(output_lines) > 1 and output_lines[1] == 'modified':
+ head_timestamp = None
+ if len(output_lines) > 3:
+ try:
+ head_timestamp = long(output_lines[3])
+ except ValueError:
+ pass
+ timestamp = long(time.time())
+ if head_timestamp is not None and timestamp > head_timestamp:
+ timestamp = timestamp - head_timestamp
+ if not patchlevel:
+ VERSION = "%s_p0" % (VERSION,)
+ VERSION = "%s_p%d" % (VERSION, timestamp)
+ return VERSION
+ else:
+ print("NO output lines :(")
+ VERSION = 'HEAD'
+ return VERSION
+ VERSION = _LazyVersion()
diff --git a/repoman/pym/repoman/main.py b/repoman/pym/repoman/main.py
index 2c9445a..825a82e 100755
--- a/repoman/pym/repoman/main.py
+++ b/repoman/pym/repoman/main.py
@@ -36,6 +36,7 @@ from repoman.repos import RepoSettings
from repoman.scanner import Scanner
from repoman import utilities
from repoman.modules.vcs.settings import VCSSettings
+from repoman import VERSION
if sys.hexversion >= 0x3000000:
basestring = str
@@ -62,7 +63,7 @@ def repoman_main(argv):
sys.argv, qahelp, repoman_settings.get("REPOMAN_DEFAULT_OPTS", ""))
if options.version:
- print("Repoman", portage.VERSION)
+ print("Repoman", VERSION, "(portage-%s)" % portage.VERSION)
sys.exit(0)
logger = logging.getLogger()
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2017-01-06 17:17 Brian Dolbec
0 siblings, 0 replies; 22+ messages in thread
From: Brian Dolbec @ 2017-01-06 17:17 UTC (permalink / raw
To: gentoo-commits
commit: cd29451ef73a22a73d20df9cf9ff5c65ecf8a51e
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Fri Jan 6 15:11:36 2017 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Jan 6 16:06:16 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=cd29451e
repoman: add dev-qt/linguist-tools to RDEPEND.suspect set
linguist-tools is like gettext, but for Qt applications.
Gentoo-Bug: 544938
repoman/pym/repoman/qa_data.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/repoman/pym/repoman/qa_data.py b/repoman/pym/repoman/qa_data.py
index 738368e..ed7b83f 100644
--- a/repoman/pym/repoman/qa_data.py
+++ b/repoman/pym/repoman/qa_data.py
@@ -299,6 +299,7 @@ suspect_rdepend = frozenset([
"dev-lang/swig",
"dev-lang/yasm",
"dev-perl/extutils-pkgconfig",
+ "dev-qt/linguist-tools",
"dev-util/byacc",
"dev-util/cmake",
"dev-util/ftjam",
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2017-01-06 17:17 Brian Dolbec
0 siblings, 0 replies; 22+ messages in thread
From: Brian Dolbec @ 2017-01-06 17:17 UTC (permalink / raw
To: gentoo-commits
commit: d647bb50f2864b8d1dad9ea34d031c7954f54ce6
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Fri Jan 6 15:16:52 2017 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Jan 6 16:06:26 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=d647bb50
repoman: add virtual/linuxtv-dvb-headers to RDEPEND.suspect set
linuxtv-dvb-headers installs only headers. No linking happening.
Thus it isn't needed at runtime.
repoman/pym/repoman/qa_data.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/repoman/pym/repoman/qa_data.py b/repoman/pym/repoman/qa_data.py
index ed7b83f..5059e8a 100644
--- a/repoman/pym/repoman/qa_data.py
+++ b/repoman/pym/repoman/qa_data.py
@@ -326,6 +326,7 @@ suspect_rdepend = frozenset([
"sys-devel/m4",
"sys-devel/pmake",
"virtual/linux-sources",
+ "virtual/linuxtv-dvb-headers",
"virtual/pkgconfig",
"x11-misc/bdftopcf",
"x11-misc/imake",
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2017-01-06 17:17 Brian Dolbec
0 siblings, 0 replies; 22+ messages in thread
From: Brian Dolbec @ 2017-01-06 17:17 UTC (permalink / raw
To: gentoo-commits
commit: 021199792ce55bdc0f99bc7791a2b31ba1533d2e
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Fri Jan 6 15:53:22 2017 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Jan 6 16:07:09 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=02119979
repoman: add virtual/os-headers to RDEPEND.suspect set
os-headers installs only headers on Linux. No linking happening.
os-headers installs headers and shared libraries on FreeBSD.
However, it's better to restrict os-headers usage to just headers
in order to prevent its abuse for shared libraries on FreeBSD.
repoman/pym/repoman/qa_data.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/repoman/pym/repoman/qa_data.py b/repoman/pym/repoman/qa_data.py
index 5059e8a..c3f4207 100644
--- a/repoman/pym/repoman/qa_data.py
+++ b/repoman/pym/repoman/qa_data.py
@@ -327,6 +327,7 @@ suspect_rdepend = frozenset([
"sys-devel/pmake",
"virtual/linux-sources",
"virtual/linuxtv-dvb-headers",
+ "virtual/os-headers",
"virtual/pkgconfig",
"x11-misc/bdftopcf",
"x11-misc/imake",
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2017-01-13 17:13 Zac Medico
0 siblings, 0 replies; 22+ messages in thread
From: Zac Medico @ 2017-01-13 17:13 UTC (permalink / raw
To: gentoo-commits
commit: bbd4e46ec8b9158d1559c6d052cdbe89c673fabc
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 17:11:37 2017 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Jan 13 17:13:40 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=bbd4e46e
repoman: define long for python3
Fixes: 006b168c1bb6 ("repoman: Fix versioning system")
repoman/pym/repoman/__init__.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/repoman/pym/repoman/__init__.py b/repoman/pym/repoman/__init__.py
index 780b611..89779b9 100644
--- a/repoman/pym/repoman/__init__.py
+++ b/repoman/pym/repoman/__init__.py
@@ -20,6 +20,9 @@ except ImportError as e:
sys.stderr.write(" "+str(e)+"\n\n")
raise
+if sys.hexversion >= 0x3000000:
+ # pylint: disable=W0622
+ long = int
VERSION = "HEAD"
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2017-01-14 14:23 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2017-01-14 14:23 UTC (permalink / raw
To: gentoo-commits
commit: db7779a27f6f1b8c54e74adae98a25ca9fff66f3
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 17:33:19 2017 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jan 14 14:21:33 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=db7779a2
repoman: remove extra blank line in commit footer
This results in cleaner/more compact commit messages when the author has
already included some "Field: value" pair in the commit message body.
This check simply looks for a colon in the last line of the commit
message body.
Before:
dev-libs/libfoo: fix something
Yada yada yada.
Gentoo-Bug: 123
Package-Manager: Portage-2.3.3, Repoman-2.3.1
After:
dev-libs/libfoo: fix something
Yada yada yada.
Gentoo-Bug: 123
Package-Manager: Portage-2.3.3, Repoman-2.3.1
repoman/pym/repoman/actions.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py
index 189580e..58b00d4 100644
--- a/repoman/pym/repoman/actions.py
+++ b/repoman/pym/repoman/actions.py
@@ -128,6 +128,10 @@ class Actions(object):
myupdates, mymanifests, myremoved, mychanged, myautoadd,
mynew, commitmessage)
+ lastline = commitmessage.splitlines()[-1]
+ if not ':' in lastline:
+ commitmessage += '\n'
+
commit_footer = self.get_commit_footer()
commitmessage += commit_footer
@@ -337,7 +341,7 @@ class Actions(object):
portage_version = "Unknown"
# Use new footer only for git (see bug #438364).
if self.vcs_settings.vcs in ["git"]:
- commit_footer = "\n\nPackage-Manager: Portage-%s, Repoman-%s" % (
+ commit_footer = "\nPackage-Manager: Portage-%s, Repoman-%s" % (
portage.VERSION, VERSION)
if report_options:
commit_footer += "\nRepoMan-Options: " + " ".join(report_options)
@@ -351,7 +355,7 @@ class Actions(object):
unameout += platform.processor()
else:
unameout += platform.machine()
- commit_footer = "\n\n"
+ commit_footer = "\n"
if dco_sob:
commit_footer += "Signed-off-by: %s\n" % (dco_sob, )
commit_footer += "(Portage version: %s/%s/%s" % \
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2017-01-14 19:10 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2017-01-14 19:10 UTC (permalink / raw
To: gentoo-commits
commit: c4d6482f1869a7a06e41dd2a95eee700b82fe027
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 14 16:52:38 2017 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jan 14 19:08:21 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c4d6482f
repoman: always add a newline if the message body is one line
The second line in a git commit message is supposed to be blank.
Also, use a regex to more exactly match a Field: value line.
Before:
dev-libs/libfoo: fix another bug
Package-Manager: Portage-2.3.3, Repoman-2.3.1
After:
dev-libs/libfoo: fix another bug
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Acked-by: Zac Medico <zmedico <AT> gentoo.org>
repoman/pym/repoman/actions.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py
index 58b00d4..6b0c645 100644
--- a/repoman/pym/repoman/actions.py
+++ b/repoman/pym/repoman/actions.py
@@ -6,6 +6,7 @@ import errno
import io
import logging
import platform
+import re
import signal
import sys
import tempfile
@@ -128,8 +129,9 @@ class Actions(object):
myupdates, mymanifests, myremoved, mychanged, myautoadd,
mynew, commitmessage)
- lastline = commitmessage.splitlines()[-1]
- if not ':' in lastline:
+ lines = commitmessage.splitlines()
+ lastline = lines[-1]
+ if len(lines) == 1 or re.match(r'^\S+:\s', lastline) is None:
commitmessage += '\n'
commit_footer = self.get_commit_footer()
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2017-03-01 18:40 Brian Dolbec
0 siblings, 0 replies; 22+ messages in thread
From: Brian Dolbec @ 2017-03-01 18:40 UTC (permalink / raw
To: gentoo-commits
commit: d38405be3e0d22ad106e2e1e1c26dda2e216c402
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 1 18:36:46 2017 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Mar 1 18:36:46 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=d38405be
repoman: Don't update years in non-Gentoo copyright lines bug 611296
The regular expressions also match the whole line now, so broken date
ranges like "1998-2017 - 2000" won't happen any more.
For now, "Gentoo Foundation" is hardcoded as copyright holder.
If necessary, this can later be moved to repository configuration.
X-Gentoo-bug: 611296
X-Gentoo-bug-url: https://bugs.gentoo.org/611296
repoman/pym/repoman/copyrights.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/repoman/pym/repoman/copyrights.py b/repoman/pym/repoman/copyrights.py
index 761309af6..7a36ff30d 100644
--- a/repoman/pym/repoman/copyrights.py
+++ b/repoman/pym/repoman/copyrights.py
@@ -14,8 +14,10 @@ from portage import shutil
from portage import util
-_copyright_re1 = re.compile(br'^(# Copyright \d\d\d\d)-\d\d\d\d ')
-_copyright_re2 = re.compile(br'^(# Copyright )(\d\d\d\d) ')
+_copyright_re1 = \
+ re.compile(br'^(# Copyright \d\d\d\d)-\d\d\d\d( Gentoo Foundation)$')
+_copyright_re2 = \
+ re.compile(br'^(# Copyright )(\d\d\d\d)( Gentoo Foundation)$')
class _copyright_repl(object):
@@ -29,7 +31,7 @@ class _copyright_repl(object):
return matchobj.group(0)
else:
return matchobj.group(1) + matchobj.group(2) + \
- b'-' + self.year + b' '
+ b'-' + self.year + matchobj.group(3)
def update_copyright_year(year, line):
@@ -49,7 +51,7 @@ def update_copyright_year(year, line):
year = _unicode_encode(year)
line = _unicode_encode(line)
- line = _copyright_re1.sub(br'\1-' + year + b' ', line)
+ line = _copyright_re1.sub(br'\1-' + year + br'\2', line)
line = _copyright_re2.sub(_copyright_repl(year), line)
if not is_bytes:
line = _unicode_decode(line)
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2017-03-01 19:22 Brian Dolbec
0 siblings, 0 replies; 22+ messages in thread
From: Brian Dolbec @ 2017-03-01 19:22 UTC (permalink / raw
To: gentoo-commits
commit: 36cccbbf3f4613e177d2fb735c8f6ddc73799eba
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 1 19:17:15 2017 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Mar 1 19:17:15 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=36cccbbf
repoman: Fix regular expressions matching the copyright line
Fixes commit: d38405be3e0d2
The previous commit broke copyright updating for Changelogs which
have the license on the same line.
repoman/pym/repoman/copyrights.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/repoman/pym/repoman/copyrights.py b/repoman/pym/repoman/copyrights.py
index 7a36ff30d..94257c942 100644
--- a/repoman/pym/repoman/copyrights.py
+++ b/repoman/pym/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)$')
+ re.compile(br'^(# Copyright \d\d\d\d)-\d\d\d\d( Gentoo Foundation)\b')
_copyright_re2 = \
- re.compile(br'^(# Copyright )(\d\d\d\d)( Gentoo Foundation)$')
+ re.compile(br'^(# Copyright )(\d\d\d\d)( Gentoo Foundation)\b')
class _copyright_repl(object):
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2017-03-15 21:56 Brian Dolbec
0 siblings, 0 replies; 22+ messages in thread
From: Brian Dolbec @ 2017-03-15 21:56 UTC (permalink / raw
To: gentoo-commits
commit: fd893603470071e5657e381f4461ee11a31474d6
Author: Doug Goldstein <cardoe <AT> cardoe <DOT> com>
AuthorDate: Wed Mar 15 21:27:30 2017 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Mar 15 21:56:02 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=fd893603
repoman: Change how the tmp file for the commit msg is made (bug 571546)
Changes the way the temporary file for the commit message is generated
to make a temporary directory and create a file called COMMIT_EDITMSG
inside of it. This is to cause various editors to treat this as a git
style commit message by default.
Signed-off-by: Doug Goldstein <cardoe <AT> cardoe.com>
X-Gentoo-Bug: 571546
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=571546
repoman/pym/repoman/actions.py | 21 +++++++++++----------
repoman/pym/repoman/utilities.py | 39 ++++++++++++++++++++-------------------
2 files changed, 31 insertions(+), 29 deletions(-)
diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py
index 6b0c6459d..73b44c5f5 100644
--- a/repoman/pym/repoman/actions.py
+++ b/repoman/pym/repoman/actions.py
@@ -7,6 +7,7 @@ import io
import logging
import platform
import re
+import shutil
import signal
import sys
import tempfile
@@ -457,15 +458,15 @@ class Actions(object):
myfiles += myremoved
myfiles.sort()
- fd, commitmessagefile = tempfile.mkstemp(".repoman.msg")
- mymsg = os.fdopen(fd, "wb")
- mymsg.write(_unicode_encode(commitmessage))
- mymsg.close()
+ commitmessagedir = tempfile.mkdtemp(".repoman.msg")
+ commitmessagefile = os.path.join(commitmessagedir, "COMMIT_EDITMSG")
+ with open(commitmessagefile, "wb") as mymsg:
+ mymsg.write(_unicode_encode(commitmessage))
retval = self.vcs_settings.changes.commit(myfiles, commitmessagefile)
# cleanup the commit message before possibly exiting
try:
- os.unlink(commitmessagefile)
+ shutil.rmtree(commitmessagedir)
except OSError:
pass
if retval != os.EX_OK:
@@ -478,10 +479,10 @@ class Actions(object):
def priming_commit(self, myupdates, myremoved, commitmessage):
myfiles = myupdates + myremoved
- fd, commitmessagefile = tempfile.mkstemp(".repoman.msg")
- mymsg = os.fdopen(fd, "wb")
- mymsg.write(_unicode_encode(commitmessage))
- mymsg.close()
+ commitmessagedir = tempfile.mkdtemp(".repoman.msg")
+ commitmessagefile = os.path.join(commitmessagedir, "COMMIT_EDITMSG")
+ with open(commitmessagefile, "wb") as mymsg:
+ mymsg.write(_unicode_encode(commitmessage))
separator = '-' * 78
@@ -500,7 +501,7 @@ class Actions(object):
retval = self.vcs_settings.changes.commit(myfiles, commitmessagefile)
# cleanup the commit message before possibly exiting
try:
- os.unlink(commitmessagefile)
+ shutil.rmtree(commitmessagedir)
except OSError:
pass
if retval != os.EX_OK:
diff --git a/repoman/pym/repoman/utilities.py b/repoman/pym/repoman/utilities.py
index 8a757dc85..c204faa8d 100644
--- a/repoman/pym/repoman/utilities.py
+++ b/repoman/pym/repoman/utilities.py
@@ -30,7 +30,7 @@ import sys
import time
import textwrap
import difflib
-from tempfile import mkstemp
+import tempfile
# import our initialized portage instance
from repoman._portage import portage
@@ -187,23 +187,24 @@ def get_commit_message_with_editor(editor, message=None, prefix=""):
@rtype: string or None
@return: A string on success or None if an error occurs.
"""
- fd, filename = mkstemp()
+ commitmessagedir = tempfile.mkdtemp(".repoman.msg")
+ filename = os.path.join(commitmessagedir, "COMMIT_EDITMSG")
try:
- os.write(
- fd, _unicode_encode(_(
- prefix +
- "\n\n# Please enter the commit message "
- "for your changes.\n# (Comment lines starting "
- "with '#' will not be included)\n"),
- encoding=_encodings['content'], errors='backslashreplace'))
- if message:
- os.write(fd, b"#\n")
- for line in message:
- os.write(
- fd, _unicode_encode(
- "#" + line, encoding=_encodings['content'],
- errors='backslashreplace'))
- os.close(fd)
+ with open(filename, "wb") as mymsg:
+ mymsg.write(
+ _unicode_encode(_(
+ prefix +
+ "\n\n# Please enter the commit message "
+ "for your changes.\n# (Comment lines starting "
+ "with '#' will not be included)\n"),
+ encoding=_encodings['content'], errors='backslashreplace'))
+ if message:
+ mymsg.write(b"#\n")
+ for line in message:
+ mymsg.write(
+ _unicode_encode(
+ "#" + line, encoding=_encodings['content'],
+ errors='backslashreplace'))
retval = os.system(editor + " '%s'" % filename)
if not (os.WIFEXITED(retval) and os.WEXITSTATUS(retval) == os.EX_OK):
return None
@@ -220,7 +221,7 @@ def get_commit_message_with_editor(editor, message=None, prefix=""):
return "".join(line for line in mylines if not line.startswith("#"))
finally:
try:
- os.unlink(filename)
+ shutil.rmtree(commitmessagedir)
except OSError:
pass
@@ -409,7 +410,7 @@ def UpdateChangeLog(
except EnvironmentError:
pass
- f, clnew_path = mkstemp()
+ f, clnew_path = tempfile.mkstemp()
# construct correct header first
try:
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2017-07-18 23:08 Brian Dolbec
0 siblings, 0 replies; 22+ messages in thread
From: Brian Dolbec @ 2017-07-18 23:08 UTC (permalink / raw
To: gentoo-commits
commit: 349b7ab2ef9cab45f4af05c6ab1fa0ccce5c2314
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Tue May 30 10:18:58 2017 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Jul 18 18:40:49 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=349b7ab2
repoman: Mark ruby-2.0 as deprecated
repoman/pym/repoman/qa_data.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/repoman/pym/repoman/qa_data.py b/repoman/pym/repoman/qa_data.py
index a59fed778..fed798f9f 100644
--- a/repoman/pym/repoman/qa_data.py
+++ b/repoman/pym/repoman/qa_data.py
@@ -358,6 +358,7 @@ ruby_deprecated = frozenset([
"ruby_targets_ree18",
"ruby_targets_ruby18",
"ruby_targets_ruby19",
+ "ruby_targets_ruby20",
])
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2017-08-06 6:54 Michał Górny
0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2017-08-06 6:54 UTC (permalink / raw
To: gentoo-commits
commit: 2011a7f77bd229afed7b3f92ae036ff7323ed03b
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 3 13:52:53 2017 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Aug 6 06:54:01 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2011a7f7
repoman commit: Merge code generating common part of the footer (DCO)
The DCO Signed-off-by footer looks the same on the git branch, and on
the branch for other VCS-es. Therefore, move the code generating it
above the split branches. This also prepares the code for further footer
elements being added.
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
repoman/pym/repoman/actions.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py
index 73b44c5f5..00bb5b2ca 100644
--- a/repoman/pym/repoman/actions.py
+++ b/repoman/pym/repoman/actions.py
@@ -342,25 +342,26 @@ class Actions(object):
sys.stderr.write("Failed to insert portage version in message!\n")
sys.stderr.flush()
portage_version = "Unknown"
+
+ # Common part of commit footer
+ commit_footer = "\n"
+ if dco_sob:
+ commit_footer += "Signed-off-by: %s\n" % (dco_sob, )
+
# Use new footer only for git (see bug #438364).
if self.vcs_settings.vcs in ["git"]:
- commit_footer = "\nPackage-Manager: Portage-%s, Repoman-%s" % (
+ commit_footer += "Package-Manager: Portage-%s, Repoman-%s" % (
portage.VERSION, VERSION)
if report_options:
commit_footer += "\nRepoMan-Options: " + " ".join(report_options)
if self.repo_settings.sign_manifests:
commit_footer += "\nManifest-Sign-Key: %s" % (gpg_key, )
- if dco_sob:
- commit_footer += "\nSigned-off-by: %s" % (dco_sob, )
else:
unameout = platform.system() + " "
if platform.system() in ["Darwin", "SunOS"]:
unameout += platform.processor()
else:
unameout += platform.machine()
- commit_footer = "\n"
- if dco_sob:
- commit_footer += "Signed-off-by: %s\n" % (dco_sob, )
commit_footer += "(Portage version: %s/%s/%s" % \
(portage_version, self.vcs_settings.vcs, unameout)
if report_options:
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2018-02-27 19:07 Michał Górny
0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2018-02-27 19:07 UTC (permalink / raw
To: gentoo-commits
commit: 518d4ec639187fa5c3565eeae05274abbeb7e813
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 17 12:22:01 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Feb 27 19:06:53 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=518d4ec6
repoman: Remove support for getting messages from stdin
Remove the support for getting commit messages from stdin, in favor
of always using external editor. This was never very useful, especially
given that was implemented poorly and with commit message verification
it will become even more painful to keep.
Reviewed-by: Brian Dolbec <dolsen <AT> gentoo.org>
repoman/pym/repoman/actions.py | 4 +++-
repoman/pym/repoman/utilities.py | 22 +---------------------
2 files changed, 4 insertions(+), 22 deletions(-)
diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py
index 57b528312..cd954223a 100644
--- a/repoman/pym/repoman/actions.py
+++ b/repoman/pym/repoman/actions.py
@@ -585,7 +585,9 @@ class Actions(object):
commitmessage = utilities.get_commit_message_with_editor(
editor, message=qa_output, prefix=msg_prefix)
else:
- commitmessage = utilities.get_commit_message_with_stdin()
+ print("EDITOR is unset or invalid. Please set EDITOR to your preferred editor.")
+ print(bad("* no EDITOR found for commit message, aborting commit."))
+ sys.exit(1)
except KeyboardInterrupt:
logging.fatal("Interrupted; exiting...")
sys.exit(1)
diff --git a/repoman/pym/repoman/utilities.py b/repoman/pym/repoman/utilities.py
index c204faa8d..1272f3fb6 100644
--- a/repoman/pym/repoman/utilities.py
+++ b/repoman/pym/repoman/utilities.py
@@ -1,6 +1,6 @@
# -*- coding:utf-8 -*-
# repoman: Utilities
-# Copyright 2007-2013 Gentoo Foundation
+# Copyright 2007-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
"""This module contains utility functions to help repoman find ebuilds to
@@ -13,7 +13,6 @@ __all__ = [
"FindPackagesToScan",
"FindPortdir",
"get_commit_message_with_editor",
- "get_commit_message_with_stdin",
"get_committer_name",
"have_ebuild_dir",
"have_profile_dir",
@@ -226,25 +225,6 @@ def get_commit_message_with_editor(editor, message=None, prefix=""):
pass
-def get_commit_message_with_stdin():
- """
- Read a commit message from the user and return it.
-
- @rtype: string or None
- @return: A string on success or None if an error occurs.
- """
- print(
- "Please enter a commit message."
- " Use Ctrl-d to finish or Ctrl-c to abort.")
- commitmessage = []
- while True:
- commitmessage.append(sys.stdin.readline())
- if not commitmessage[-1]:
- break
- commitmessage = "".join(commitmessage)
- return commitmessage
-
-
def FindPortdir(settings):
""" Try to figure out what repo we are in and whether we are in a regular
tree or an overlay.
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2018-02-27 19:07 Michał Górny
0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2018-02-27 19:07 UTC (permalink / raw
To: gentoo-commits
commit: d9073997f41e113fe8b5261797ee92b38c8a04a5
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 17 12:32:57 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Feb 27 19:06:56 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=d9073997
repoman: Verify commit messages when using EDITOR
Reviewed-by: Brian Dolbec <dolsen <AT> gentoo.org>
repoman/pym/repoman/actions.py | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py
index cd954223a..8e23322c8 100644
--- a/repoman/pym/repoman/actions.py
+++ b/repoman/pym/repoman/actions.py
@@ -129,7 +129,23 @@ class Actions(object):
else:
sys.exit(1)
else:
- commitmessage = self.get_new_commit_message(qa_output)
+ commitmessage = None
+ msg_qa_output = qa_output
+ initial_message = None
+ while True:
+ commitmessage = self.get_new_commit_message(
+ msg_qa_output, commitmessage)
+ res, expl = self.verify_commit_message(commitmessage)
+ if res:
+ break
+ else:
+ full_expl = '''Issues with the commit message were found. Please fix it or remove
+the whole commit message to abort.
+
+''' + expl
+ msg_qa_output = (
+ [' %s\n' % x for x in full_expl.splitlines()]
+ + qa_output)
commitmessage = commitmessage.rstrip()
@@ -577,8 +593,8 @@ class Actions(object):
prefix = "/".join(self.scanner.reposplit[1:]) + ": "
return prefix
- def get_new_commit_message(self, qa_output):
- msg_prefix = self.msg_prefix()
+ def get_new_commit_message(self, qa_output, old_message=None):
+ msg_prefix = old_message or self.msg_prefix()
try:
editor = os.environ.get("EDITOR")
if editor and utilities.editor_is_executable(editor):
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2018-03-30 17:23 Zac Medico
0 siblings, 0 replies; 22+ messages in thread
From: Zac Medico @ 2018-03-30 17:23 UTC (permalink / raw
To: gentoo-commits
commit: 1b2256106e368504b69e12514004d0e8a8e73b9b
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 30 13:43:44 2018 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Mar 30 17:22:35 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1b225610
FileNotFoundError is not defined in python2.7
Closes: https://github.com/gentoo/portage/pull/288
Fixes: 36fd0a505fe0 ("repoman: Add a new config.py file with config loading utilities")
repoman/pym/repoman/config.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/repoman/pym/repoman/config.py b/repoman/pym/repoman/config.py
index 0f2358cd9..578bbccde 100644
--- a/repoman/pym/repoman/config.py
+++ b/repoman/pym/repoman/config.py
@@ -8,6 +8,11 @@ import stat
import yaml
+try:
+ FileNotFoundError
+except NameError:
+ FileNotFoundError = EnvironmentError
+
class ConfigError(Exception):
"""Raised when a config file fails to load"""
^ permalink raw reply related [flat|nested] 22+ messages in thread
end of thread, other threads:[~2018-03-30 17:23 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-06 6:54 [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2018-03-30 17:23 Zac Medico
2018-02-27 19:07 Michał Górny
2018-02-27 19:07 Michał Górny
2017-07-18 23:08 Brian Dolbec
2017-03-15 21:56 Brian Dolbec
2017-03-01 19:22 Brian Dolbec
2017-03-01 18:40 Brian Dolbec
2017-01-14 19:10 Mike Gilbert
2017-01-14 14:23 Mike Gilbert
2017-01-13 17:13 Zac Medico
2017-01-06 17:17 Brian Dolbec
2017-01-06 17:17 Brian Dolbec
2017-01-06 17:17 Brian Dolbec
2016-12-06 3:54 Brian Dolbec
2016-10-11 18:54 Brian Dolbec
2016-09-15 18:46 Brian Dolbec
2016-09-15 18:46 Brian Dolbec
2016-06-30 5:54 Michał Górny
2016-06-28 15:34 Mike Frysinger
2016-06-24 6:38 Zac Medico
2016-05-15 23:51 Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox