Re: [gentoo-portage-dev] [PATCH] repoman: remove extra blank line in commit footer

2017-01-13 Thread Brian Dolbec
On Fri, 13 Jan 2017 12:42:18 -0500
Mike Gilbert  wrote:

> 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 189580ea2..58b00d494 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" % \

looks good, you can push it once your enable to the repo...


-- 
Brian Dolbec 




Re: [gentoo-portage-dev] [PATCH] repoman: add HOMEPAGE.missingurischeme check

2017-01-13 Thread Zac Medico
On 01/09/2017 02:07 AM, Wim Muskee wrote:
> thx Zac, I would never have figured that out myself
> 
> the updated patch:
> 
> From c703875bebd82271921d7e94b7cd61936b87d32b Mon Sep 17 00:00:00 2001
> From: Wim Muskee >
> Date: Sat, 7 Jan 2017 12:02:41 +0100
> Subject: [PATCH] repoman: add HOMEPAGE.missingurischeme check

Thanks, merged:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=55dedaa865334543e51693838700dcf5e72754d2
-- 
Thanks,
Zac



[gentoo-portage-dev] [PATCH] repoman: remove extra blank line in commit footer

2017-01-13 Thread Mike Gilbert
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 189580ea2..58b00d494 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" % \
-- 
2.11.0