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 B88DA138206 for ; Thu, 28 Apr 2016 15:05:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DA60421C068; Thu, 28 Apr 2016 15:05:48 +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 0234C21C05C for ; Thu, 28 Apr 2016 15:05:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 DF5B4340B6E for ; Thu, 28 Apr 2016 15:05:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2686832D for ; Thu, 28 Apr 2016 15:05:44 +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: <1461854927.e5d298ccb05b630f17035f31a79c2fe55b90bf07.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: e5d298ccb05b630f17035f31a79c2fe55b90bf07 X-VCS-Branch: repoman Date: Thu, 28 Apr 2016 15:05:44 +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: e40fbda8-6bf5-4876-ba46-467e3fc79f7d X-Archives-Hash: 9fc7ddb474d7f16bea4c908a28f968e0 commit: e5d298ccb05b630f17035f31a79c2fe55b90bf07 Author: Brian Dolbec gentoo org> AuthorDate: Wed Apr 27 03:12:53 2016 +0000 Commit: Brian Dolbec gentoo 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") 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 28755138206 for ; Fri, 29 Apr 2016 17:25:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6FAF821C08F; Fri, 29 Apr 2016 17:24:53 +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 350EC21C08E for ; Fri, 29 Apr 2016 17:24:52 +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 8BB6D340D96 for ; Fri, 29 Apr 2016 17:24:50 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0A9BC95C for ; Fri, 29 Apr 2016 17:24:46 +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: <1461854927.e5d298ccb05b630f17035f31a79c2fe55b90bf07.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:master 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: e5d298ccb05b630f17035f31a79c2fe55b90bf07 X-VCS-Branch: master Date: Fri, 29 Apr 2016 17:24:46 +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: 166a6d4c-2d67-417e-a81c-145089fe16c1 X-Archives-Hash: 392b2aec1790a6d82be001702c14a480 Message-ID: <20160429172446.e-lSWz3G6FlzyFW3psEUhHKWjwuVZ3uXq6iAeI7ubaU@z> commit: e5d298ccb05b630f17035f31a79c2fe55b90bf07 Author: Brian Dolbec gentoo org> AuthorDate: Wed Apr 27 03:12:53 2016 +0000 Commit: Brian Dolbec gentoo 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")