public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/
Date: Thu, 28 Apr 2016 15:05:44 +0000 (UTC)	[thread overview]
Message-ID: <1461854927.e5d298ccb05b630f17035f31a79c2fe55b90bf07.dolsen@gentoo> (raw)

commit:     e5d298ccb05b630f17035f31a79c2fe55b90bf07
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 27 03:12:53 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Apr 28 14:48:47 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=e5d298cc

repoman/scanner.py: Make some variables  local instead of classwide

Some were not needed outside of __init__.
Some are included  self.kwargs.
Several classwide variables repolevel, reposplit, categories are accessed
outside of the scanner class.  So therefore can not be made local.

 pym/repoman/scanner.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index d966513..a5c54b1 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -107,13 +107,13 @@ class Scanner(object):
 		self.repo_settings.repoman_settings['PORTAGE_ARCHLIST'] = ' '.join(sorted(kwlist))
 		self.repo_settings.repoman_settings.backup_changes('PORTAGE_ARCHLIST')
 
-		self.profiles = setup_profile(profile_list)
+		profiles = setup_profile(profile_list)
 
-		check_profiles(self.profiles, self.repo_settings.repoman_settings.archlist())
+		check_profiles(profiles, self.repo_settings.repoman_settings.archlist())
 
 		scanlist = scan(self.repolevel, self.reposplit, startdir, self.categories, self.repo_settings)
 
-		self.dev_keywords = dev_profile_keywords(self.profiles)
+		self.dev_keywords = dev_profile_keywords(profiles)
 
 		self.qatracker = self.vcs_settings.qatracker
 
@@ -123,7 +123,7 @@ class Scanner(object):
 		if self.vcs_settings.vcs is None:
 			self.options.echangelog = 'n'
 
-		self.checks = {}
+		checks = {}
 		# The --echangelog option causes automatic ChangeLog generation,
 		# which invalidates changelog.ebuildadded and changelog.missing
 		# checks.
@@ -135,7 +135,7 @@ class Scanner(object):
 		# TODO: shouldn't this just be switched on the repo, iso the VCS?
 		is_echangelog_enabled = self.options.echangelog in ('y', 'force')
 		self.vcs_settings.vcs_is_cvs_or_svn = self.vcs_settings.vcs in ('cvs', 'svn')
-		self.checks['changelog'] = not is_echangelog_enabled and self.vcs_settings.vcs_is_cvs_or_svn
+		checks['changelog'] = not is_echangelog_enabled and self.vcs_settings.vcs_is_cvs_or_svn
 
 		if self.options.mode == "manifest" or self.options.quiet:
 			pass
@@ -170,7 +170,7 @@ class Scanner(object):
 
 		# Disable the "self.modules['Ebuild'].notadded" check when not in commit mode and
 		# running `svn status` in every package dir will be too expensive.
-		self.checks['ebuild_notadded'] = not \
+		checks['ebuild_notadded'] = not \
 			(self.vcs_settings.vcs == "svn" and self.repolevel < 3 and self.options.mode != "commit")
 
 		self.effective_scanlist = scanlist
@@ -188,9 +188,9 @@ class Scanner(object):
 			"options": self.options,
 			"metadata_xsd": metadata_xsd,
 			"uselist": uselist,
-			"checks": self.checks,
+			"checks": checks,
 			"repo_metadata": self.repo_metadata,
-			"profiles": self.profiles,
+			"profiles": profiles,
 			"include_arches": self.include_arches,
 			"caches": self.caches,
 			"repoman_incrementals": self.repoman_incrementals,
@@ -291,7 +291,7 @@ class Scanner(object):
 			checkdirlist = os.listdir(checkdir)
 
 			# Run the status check
-			if self.checks['ebuild_notadded']:
+			if self.kwargs['checks']['ebuild_notadded']:
 				self.vcs_settings.status.check(checkdir, checkdir_relative, xpkg)
 
 			dynamic_data = {
@@ -350,7 +350,7 @@ class Scanner(object):
 			ebuildlist = sorted(pkgs.values())
 			ebuildlist = [pkg.pf for pkg in ebuildlist]
 
-			if self.checks['changelog'] and "ChangeLog" not in checkdirlist:
+			if self.kwargs['checks']['changelog'] and "ChangeLog" not in checkdirlist:
 				self.qatracker.add_error("changelog.missing", xpkg + "/ChangeLog")
 
 			changelog_path = os.path.join(checkdir_relative, "ChangeLog")


WARNING: multiple messages have this Message-ID (diff)
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/
Date: Fri, 29 Apr 2016 17:24:46 +0000 (UTC)	[thread overview]
Message-ID: <1461854927.e5d298ccb05b630f17035f31a79c2fe55b90bf07.dolsen@gentoo> (raw)
Message-ID: <20160429172446.e-lSWz3G6FlzyFW3psEUhHKWjwuVZ3uXq6iAeI7ubaU@z> (raw)

commit:     e5d298ccb05b630f17035f31a79c2fe55b90bf07
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 27 03:12:53 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Apr 28 14:48:47 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=e5d298cc

repoman/scanner.py: Make some variables  local instead of classwide

Some were not needed outside of __init__.
Some are included  self.kwargs.
Several classwide variables repolevel, reposplit, categories are accessed
outside of the scanner class.  So therefore can not be made local.

 pym/repoman/scanner.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index d966513..a5c54b1 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -107,13 +107,13 @@ class Scanner(object):
 		self.repo_settings.repoman_settings['PORTAGE_ARCHLIST'] = ' '.join(sorted(kwlist))
 		self.repo_settings.repoman_settings.backup_changes('PORTAGE_ARCHLIST')
 
-		self.profiles = setup_profile(profile_list)
+		profiles = setup_profile(profile_list)
 
-		check_profiles(self.profiles, self.repo_settings.repoman_settings.archlist())
+		check_profiles(profiles, self.repo_settings.repoman_settings.archlist())
 
 		scanlist = scan(self.repolevel, self.reposplit, startdir, self.categories, self.repo_settings)
 
-		self.dev_keywords = dev_profile_keywords(self.profiles)
+		self.dev_keywords = dev_profile_keywords(profiles)
 
 		self.qatracker = self.vcs_settings.qatracker
 
@@ -123,7 +123,7 @@ class Scanner(object):
 		if self.vcs_settings.vcs is None:
 			self.options.echangelog = 'n'
 
-		self.checks = {}
+		checks = {}
 		# The --echangelog option causes automatic ChangeLog generation,
 		# which invalidates changelog.ebuildadded and changelog.missing
 		# checks.
@@ -135,7 +135,7 @@ class Scanner(object):
 		# TODO: shouldn't this just be switched on the repo, iso the VCS?
 		is_echangelog_enabled = self.options.echangelog in ('y', 'force')
 		self.vcs_settings.vcs_is_cvs_or_svn = self.vcs_settings.vcs in ('cvs', 'svn')
-		self.checks['changelog'] = not is_echangelog_enabled and self.vcs_settings.vcs_is_cvs_or_svn
+		checks['changelog'] = not is_echangelog_enabled and self.vcs_settings.vcs_is_cvs_or_svn
 
 		if self.options.mode == "manifest" or self.options.quiet:
 			pass
@@ -170,7 +170,7 @@ class Scanner(object):
 
 		# Disable the "self.modules['Ebuild'].notadded" check when not in commit mode and
 		# running `svn status` in every package dir will be too expensive.
-		self.checks['ebuild_notadded'] = not \
+		checks['ebuild_notadded'] = not \
 			(self.vcs_settings.vcs == "svn" and self.repolevel < 3 and self.options.mode != "commit")
 
 		self.effective_scanlist = scanlist
@@ -188,9 +188,9 @@ class Scanner(object):
 			"options": self.options,
 			"metadata_xsd": metadata_xsd,
 			"uselist": uselist,
-			"checks": self.checks,
+			"checks": checks,
 			"repo_metadata": self.repo_metadata,
-			"profiles": self.profiles,
+			"profiles": profiles,
 			"include_arches": self.include_arches,
 			"caches": self.caches,
 			"repoman_incrementals": self.repoman_incrementals,
@@ -291,7 +291,7 @@ class Scanner(object):
 			checkdirlist = os.listdir(checkdir)
 
 			# Run the status check
-			if self.checks['ebuild_notadded']:
+			if self.kwargs['checks']['ebuild_notadded']:
 				self.vcs_settings.status.check(checkdir, checkdir_relative, xpkg)
 
 			dynamic_data = {
@@ -350,7 +350,7 @@ class Scanner(object):
 			ebuildlist = sorted(pkgs.values())
 			ebuildlist = [pkg.pf for pkg in ebuildlist]
 
-			if self.checks['changelog'] and "ChangeLog" not in checkdirlist:
+			if self.kwargs['checks']['changelog'] and "ChangeLog" not in checkdirlist:
 				self.qatracker.add_error("changelog.missing", xpkg + "/ChangeLog")
 
 			changelog_path = os.path.join(checkdir_relative, "ChangeLog")


             reply	other threads:[~2016-04-28 15:05 UTC|newest]

Thread overview: 217+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 15:05 Brian Dolbec [this message]
2016-04-29 17:24 ` [gentoo-commits] proj/portage:master commit in: pym/repoman/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2016-05-03  9:33 [gentoo-commits] proj/portage:repoman " Brian Dolbec
2016-04-29 17:24 [gentoo-commits] proj/portage:master " Brian Dolbec
2016-04-28 15:05 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2016-04-29 17:24 [gentoo-commits] proj/portage:master " Brian Dolbec
2016-04-28 15:05 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2016-04-29 17:24 [gentoo-commits] proj/portage:master " Brian Dolbec
2016-04-26 14:47 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2016-04-27  5:22 Brian Dolbec
2016-04-27  5:22 Brian Dolbec
2016-04-27  5:22 Brian Dolbec
2016-04-26 18:08 Zac Medico
2016-04-25 15:32 Brian Dolbec
2016-04-25 15:32 Brian Dolbec
2016-04-25 15:32 Brian Dolbec
2016-04-21 16:54 Brian Dolbec
2016-04-21 16:54 Brian Dolbec
2016-04-21 16:54 Brian Dolbec
2016-04-21 16:54 Brian Dolbec
2016-04-17 15:42 Brian Dolbec
2016-04-16 20:00 Zac Medico
2016-03-15 19:00 Brian Dolbec
2016-03-12 18:10 Brian Dolbec
2016-03-12 18:10 Brian Dolbec
2016-03-12 18:10 Brian Dolbec
2016-03-11  0:41 Brian Dolbec
2016-03-11  0:41 Brian Dolbec
2016-03-11  0:41 Brian Dolbec
2016-03-07 21:53 Brian Dolbec
2016-03-07 21:53 Brian Dolbec
2016-03-07 21:53 Brian Dolbec
2016-02-01  7:55 Zac Medico
2016-02-01  7:21 Zac Medico
2016-01-31 20:03 Brian Dolbec
2016-01-31 20:03 Brian Dolbec
2016-01-31 20:03 Brian Dolbec
2016-01-30  8:00 Brian Dolbec
2016-01-30  8:00 Brian Dolbec
2016-01-30  8:00 Brian Dolbec
2016-01-30  6:58 Brian Dolbec
2016-01-30  6:58 Brian Dolbec
2016-01-30  6:58 Brian Dolbec
2016-01-29  5:01 Brian Dolbec
2016-01-29  5:01 Brian Dolbec
2016-01-29  5:01 Brian Dolbec
2016-01-27 23:15 Brian Dolbec
2016-01-27 23:15 Brian Dolbec
2016-01-27 23:15 Brian Dolbec
2016-01-23  1:42 Brian Dolbec
2016-01-23  1:42 Brian Dolbec
2016-01-23  1:42 Brian Dolbec
2016-01-22 20:55 Brian Dolbec
2016-01-22 20:55 Brian Dolbec
2016-01-22 20:55 Brian Dolbec
2016-01-21 19:42 Brian Dolbec
2016-01-21 19:42 Brian Dolbec
2016-01-21 19:15 Brian Dolbec
2016-01-21 18:30 Brian Dolbec
2016-01-21 18:30 Brian Dolbec
2016-01-18 19:23 Brian Dolbec
2016-01-18 19:23 Brian Dolbec
2016-01-11  8:01 Brian Dolbec
2016-01-11  8:01 Brian Dolbec
2016-01-11  6:31 Brian Dolbec
2016-01-11  6:31 Brian Dolbec
2016-01-11  6:31 Brian Dolbec
2016-01-10 20:17 Brian Dolbec
2016-01-10 20:17 Brian Dolbec
2016-01-10 20:17 Brian Dolbec
2016-01-10  3:26 Brian Dolbec
2016-01-10  3:26 Brian Dolbec
2016-01-10  3:26 Brian Dolbec
2016-01-06  4:21 Brian Dolbec
2016-01-06  4:21 Brian Dolbec
2015-12-30 23:38 Brian Dolbec
2015-09-21 23:51 [gentoo-commits] proj/portage:master " Brian Dolbec
2015-09-21 23:47 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2015-09-21 23:51 [gentoo-commits] proj/portage:master " Brian Dolbec
2015-09-21 23:47 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2015-09-21 23:51 [gentoo-commits] proj/portage:master " Brian Dolbec
2015-09-21 23:47 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2015-09-21 23:51 [gentoo-commits] proj/portage:master " Brian Dolbec
2015-09-21 23:47 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2015-09-21 23:51 [gentoo-commits] proj/portage:master " Brian Dolbec
2015-09-21 23:47 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  2:06 Brian Dolbec
2015-09-20  0:20 Brian Dolbec
2015-09-19 17:32 Brian Dolbec
2015-09-19 16:48 Brian Dolbec
2015-09-19 16:28 Brian Dolbec
2015-09-19 16:28 Brian Dolbec
2015-09-19  4:36 Brian Dolbec
2015-09-19  4:36 Brian Dolbec
2015-09-19  4:36 Brian Dolbec
2015-09-19  4:36 Brian Dolbec
2015-09-19  4:36 Brian Dolbec
2015-09-19  4:36 Brian Dolbec
2015-09-19  4:36 Brian Dolbec
2015-09-19  4:36 Brian Dolbec
2015-09-19  4:36 Brian Dolbec
2015-09-19  4:36 Brian Dolbec
2015-09-19  1:22 Brian Dolbec
2015-09-19  1:22 Brian Dolbec
2015-09-17 18:58 Brian Dolbec
2015-09-17 18:58 Brian Dolbec
2015-09-17 15:32 Brian Dolbec
2015-09-17  4:51 Brian Dolbec
2015-09-17  4:51 Brian Dolbec
2015-09-17  4:51 Brian Dolbec
2015-09-17  4:51 Brian Dolbec
2015-09-17  4:51 Brian Dolbec
2015-09-17  4:51 Brian Dolbec
2015-09-17  4:51 Brian Dolbec
2015-09-17  4:51 Brian Dolbec
2015-09-17  4:51 Brian Dolbec
2015-09-17  3:08 Brian Dolbec
2015-09-17  3:08 Brian Dolbec
2015-09-17  3:08 Brian Dolbec
2015-09-17  3:08 Brian Dolbec
2015-09-17  3:08 Brian Dolbec
2015-09-17  3:08 Brian Dolbec
2015-09-17  3:08 Brian Dolbec
2015-09-17  3:08 Brian Dolbec
2015-09-17  3:08 Brian Dolbec
2015-09-17  2:45 Brian Dolbec
2015-09-17  2:45 Brian Dolbec
2015-09-17  2:45 Brian Dolbec
2015-09-05 21:48 Brian Dolbec
2015-09-05 21:48 Brian Dolbec
2015-09-05 21:48 Brian Dolbec
2015-09-05 21:48 Brian Dolbec
2015-09-05 21:48 Brian Dolbec
2015-09-05 21:48 Brian Dolbec
2015-09-05 21:27 Brian Dolbec
2015-09-05 21:27 Brian Dolbec
2015-09-05 21:27 Brian Dolbec
2015-09-05 21:27 Brian Dolbec
2015-09-05 21:27 Brian Dolbec
2015-09-05 21:27 Brian Dolbec
2015-08-11 23:54 Brian Dolbec
2015-08-11 23:54 Brian Dolbec
2015-08-11 23:54 Brian Dolbec
2015-08-11 23:54 Brian Dolbec
2015-08-11 23:54 Brian Dolbec
2015-08-11 23:54 Brian Dolbec
2015-08-10 14:45 Michał Górny
2015-08-10 14:45 Michał Górny
2015-08-10 14:45 Michał Górny
2015-08-10 14:45 Michał Górny
2015-08-10 14:45 Michał Górny
2015-08-10 14:45 Michał Górny
2015-08-10 13:44 Brian Dolbec
2015-08-10 13:44 Brian Dolbec
2015-08-10 13:44 Brian Dolbec
2015-08-10 13:44 Brian Dolbec
2015-08-10 13:44 Brian Dolbec
2015-08-10 13:44 Brian Dolbec
2014-11-17  2:08 Brian Dolbec
2014-11-17  0:55 Brian Dolbec
2014-11-17  0:55 Brian Dolbec
2014-11-17  0:55 Brian Dolbec
2014-11-17  0:55 Brian Dolbec
2014-11-17  0:55 Brian Dolbec
2014-10-01 23:46 Brian Dolbec
2014-10-01 23:46 Brian Dolbec
2014-10-01 23:46 Brian Dolbec
2014-10-01 23:46 Brian Dolbec
2014-10-01 23:46 Brian Dolbec
2014-10-01 23:02 Brian Dolbec
2014-10-01 23:02 Brian Dolbec
2014-10-01 23:02 Brian Dolbec
2014-10-01 23:02 Brian Dolbec
2014-10-01 23:02 Brian Dolbec
2014-06-03 19:33 Brian Dolbec
2014-06-03 18:15 Brian Dolbec
2014-06-03 18:15 Brian Dolbec
2014-06-03 11:29 Tom Wijsman
2014-06-02 17:01 Tom Wijsman
2014-06-02 15:44 Brian Dolbec
2014-06-02 15:44 Brian Dolbec
2014-06-02 15:44 Brian Dolbec
2014-06-02 15:01 Tom Wijsman
2014-06-02 14:24 Brian Dolbec
2014-06-02 14:11 Tom Wijsman
2014-06-02  1:10 Brian Dolbec
2014-06-02  1:10 Brian Dolbec
2014-05-30 13:03 Brian Dolbec
2014-05-30 13:03 Brian Dolbec
2014-05-30 13:03 Brian Dolbec
2014-05-27  6:04 Brian Dolbec
2014-05-27  6:04 Brian Dolbec
2014-05-27  6:04 Brian Dolbec
2014-05-27  6:04 Brian Dolbec
2014-05-27  5:04 Brian Dolbec
2014-05-27  5:04 Brian Dolbec
2014-05-27  5:04 Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461854927.e5d298ccb05b630f17035f31a79c2fe55b90bf07.dolsen@gentoo \
    --to=dolsen@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox