Re: [gentoo-portage-dev] [PATCH 3/3] Have repoman deprecate G2CONF for the GNOME team. (bug #482084).

2014-01-19 Thread Mike Frysinger
On Wednesday 15 January 2014 19:07:20 Tom Wijsman wrote:
 +class DeprecateG2CONF(LineCheck):
 + repoman_check_name = 'G2CONF.deprecated'
 + re = re.compile(r'.*G2CONF.*')
 +
 + def check(self, num, line):
 + Run the check on line and return error if there is one
 + m = self.re.match(line)

use re.search instead of re.match so you can drop the redundant .*.  
further, i think you want to use word boundaries.  so:
re = re.compile(r'\bG2CONF\b')
-mike


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-portage-dev] [PATCH 3/3] Have repoman deprecate G2CONF for the GNOME team. (bug #482084).

2014-01-19 Thread Mike Frysinger
btw, suggestion for commit summary/message:

repoman: deprecate G2CONF

Deprecate the G2CONF variable as requested by the GNOME team.

URL: http://bugs.gentoo.org/482084
-mike


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-portage-dev] [PATCH 3/3] Have repoman deprecate G2CONF for the GNOME team. (bug #482084).

2014-01-15 Thread Jesus Rivero (Neurogeek)
On Jan 15, 2014 7:08 PM, Tom Wijsman tom...@gentoo.org wrote:

 ---
  bin/repoman   |  2 ++
  man/repoman.1 |  3 +++
  pym/repoman/checks.py | 10 ++
  3 files changed, 15 insertions(+)

 diff --git a/bin/repoman b/bin/repoman
 index 3263ceb..6754edd 100755
 --- a/bin/repoman
 +++ b/bin/repoman
 @@ -318,6 +318,7 @@ qahelp = {
 EAPI.incompatible: Ebuilds that use features that are only
available with a different EAPI,
 EAPI.unsupported: Ebuilds that have an unsupported EAPI
version (you must upgrade portage),
 SLOT.invalid: Ebuilds that have a missing or invalid SLOT
variable value,
 +   G2CONF.deprecated: G2CONF is deprecated, see Gentoo bug
#482084 and the GNOME team policies,
 HOMEPAGE.missing: Ebuilds that have a missing or empty
HOMEPAGE variable,
 HOMEPAGE.virtual: Virtuals that have a non-empty HOMEPAGE
variable,
 PDEPEND.suspect: PDEPEND contains a package that usually only
belongs in DEPEND.,
 @@ -382,6 +383,7 @@ qawarnings = set((
  dependency.badtilde,
  DESCRIPTION.toolong,
  EAPI.deprecated,
 +G2CONF.deprecated,
  HOMEPAGE.virtual,
  LICENSE.deprecated,
  LICENSE.virtual,
 diff --git a/man/repoman.1 b/man/repoman.1
 index 2bf3765..7ec43d5 100644
 --- a/man/repoman.1
 +++ b/man/repoman.1
 @@ -227,6 +227,9 @@ Syntax error in RESTRICT (usually an extra/missing
space/parenthesis)
  .B SLOT.invalid
  Ebuilds that have a missing or invalid SLOT variable value
  .TP
 +.B G2CONF.deprecated
 +G2CONF is deprecated, see Gentoo bug #482084 and the GNOME team policies
 +.TP
  .B SRC_URI.mirror
  A uri listed in profiles/thirdpartymirrors is found in SRC_URI
  .TP
 diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
 index 85aa065..c2608b0 100644
 --- a/pym/repoman/checks.py
 +++ b/pym/repoman/checks.py
 @@ -799,6 +799,16 @@ class PortageInternalVariableAssignment(LineCheck):
 e += ' on line: %d'
 return e

 +class DeprecateG2CONF(LineCheck):
 +   repoman_check_name = 'G2CONF.deprecated'
 +   re = re.compile(r'.*G2CONF.*')
 +
 +   def check(self, num, line):
 +   Run the check on line and return error if there is
one
 +   m = self.re.match(line)
 +   if m is not None:
 +   return (G2CONF on line %d is deprecated, see
Gentoo bug #482084.)
Are you missing the line number interpolation here? or %d is supposed to be
returned?
 +
  _base_check_classes = (InheritEclass, LineCheck, PhaseCheck)
  _constant_checks = None

 --
 1.8.5.2


Other than that, Looks good to me.