From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EAE87138206 for ; Wed, 27 Apr 2016 05:22:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D43DC21C005; Wed, 27 Apr 2016 05:22:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 071F721C005 for ; Wed, 27 Apr 2016 05:22:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8E7C2340BDD for ; Wed, 27 Apr 2016 05:22:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 01901960 for ; Wed, 27 Apr 2016 05:22:38 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1461734431.125d92736ef9c87077cf32b8fb254fef4a52fbc1.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/scanner.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 125d92736ef9c87077cf32b8fb254fef4a52fbc1 X-VCS-Branch: repoman Date: Wed, 27 Apr 2016 05:22:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: af76173a-bff3-4a43-882f-fa761587d88f X-Archives-Hash: 438977a5c67d5c32ae09e92ca5f32afa commit: 125d92736ef9c87077cf32b8fb254fef4a52fbc1 Author: Brian Dolbec gentoo org> AuthorDate: Wed Apr 27 03:12:53 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Wed Apr 27 05:20:31 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=125d9273 repoman/scanner.py: Make some variables local instead of classwide Some were not needed outside of __init__. Some are included self.kwargs. pym/repoman/scanner.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py index d966513..46e9d85 100644 --- a/pym/repoman/scanner.py +++ b/pym/repoman/scanner.py @@ -75,11 +75,11 @@ class Scanner(object): self.portdb._aux_cache_keys.update( ["EAPI", "IUSE", "KEYWORDS", "repository", "SLOT"]) - self.reposplit = myreporoot.split(os.path.sep) - self.repolevel = len(self.reposplit) + reposplit = myreporoot.split(os.path.sep) + self.repolevel = len(reposplit) if self.options.mode == 'commit': - repochecks.commit_check(self.repolevel, self.reposplit) + repochecks.commit_check(self.repolevel, reposplit) repochecks.conflict_check(self.vcs_settings, self.options) # Make startdir relative to the canonical repodir, so that we can pass @@ -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) + scanlist = scan(self.repolevel, 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,14 +170,14 @@ 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 if self.options.if_modified == "y": self.effective_scanlist = sorted(vcs_files_to_cps( chain(self.changed.changed, self.changed.new, self.changed.removed), - self.repolevel, self.reposplit, self.categories)) + self.repolevel, reposplit, self.categories)) # Create our kwargs dict here to initialize the plugins with self.kwargs = { @@ -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")