From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-879012-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 0036C138206 for <garchives@archives.gentoo.org>; Fri, 29 Apr 2016 17:25:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C458721C050; Fri, 29 Apr 2016 17:24:52 +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 CD15E21C050 for <gentoo-commits@lists.gentoo.org>; Fri, 29 Apr 2016 17:24:51 +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 65A0D340D83 for <gentoo-commits@lists.gentoo.org>; 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 82018344 for <gentoo-commits@lists.gentoo.org>; Fri, 29 Apr 2016 17:24:45 +0000 (UTC) From: "Brian Dolbec" <dolsen@gentoo.org> 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" <dolsen@gentoo.org> Message-ID: <1461601931.ac6c5aa13a48bc50b1aa5cfc8cb46ad9c8c42a2b.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/, pym/repoman/modules/scan/status/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/modules/scan/status/__init__.py pym/repoman/modules/scan/status/vcsstatus.py pym/repoman/scanner.py X-VCS-Directories: pym/repoman/modules/scan/status/ pym/repoman/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: ac6c5aa13a48bc50b1aa5cfc8cb46ad9c8c42a2b X-VCS-Branch: master Date: Fri, 29 Apr 2016 17:24:45 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: bcf3e721-8bba-46b6-ad49-30ecd6b851dd X-Archives-Hash: 88aa9d5e8374d5f674596b65f7a1ebd6 commit: ac6c5aa13a48bc50b1aa5cfc8cb46ad9c8c42a2b Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Mon Apr 25 16:32:11 2016 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Mon Apr 25 16:32:11 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ac6c5aa1 repoman: Migrate the vcsstatus code back to scanner.py This module had only 2 lines of useful code, the rest was boiler plate module handling code. It was also not dependant on other checks. pym/repoman/modules/scan/status/__init__.py | 31 ---------------------- pym/repoman/modules/scan/status/vcsstatus.py | 39 ---------------------------- pym/repoman/scanner.py | 6 ++++- 3 files changed, 5 insertions(+), 71 deletions(-) diff --git a/pym/repoman/modules/scan/status/__init__.py b/pym/repoman/modules/scan/status/__init__.py deleted file mode 100644 index 1abf580..0000000 --- a/pym/repoman/modules/scan/status/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2015-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -doc = """fetches plug-in module for repoman. -Performs fetch related checks on ebuilds.""" -__doc__ = doc[:] - - -module_spec = { - 'name': 'status', - 'description': doc, - 'provides':{ - 'status-module': { - 'name': "vcsstatus", - 'sourcefile': "vcsstatus", - 'class': "VCSStatus", - 'description': doc, - 'functions': ['check'], - 'func_desc': { - }, - 'mod_kwargs': ['vcs_settings', 'checks', - ], - 'func_kwargs': { - 'checkdir': (None, None), - 'checkdir_relative': (None, None), - 'xpkg': (None, None), - }, - }, - } -} - diff --git a/pym/repoman/modules/scan/status/vcsstatus.py b/pym/repoman/modules/scan/status/vcsstatus.py deleted file mode 100644 index ab81a11..0000000 --- a/pym/repoman/modules/scan/status/vcsstatus.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding:utf-8 -*- - -from repoman.modules.scan.scanbase import ScanBase - - -class VCSStatus(ScanBase): - '''Determines the status of the vcs repositories - to determine if files are not added''' - - def __init__(self, **kwargs): - '''Class init - - @param vcs_settings: VCSSettings instance - ''' - super(VCSStatus, self).__init__(**kwargs) - self.vcs_settings = kwargs.get('vcs_settings') - self.check_not_added = kwargs.get("checks")['ebuild_notadded'] - - def check(self, **kwargs): - '''Performs an indirect status check via the - correct vcs plugin Status class - - @param check_not_added: boolean - @param checkdir: string, directory path - @param checkdir_relative: repolevel determined path - @param xpkg: the current package being checked - @returns: boolean - ''' - checkdir = kwargs.get('checkdir') - checkdir_relative = kwargs.get('checkdir_relative') - xpkg = kwargs.get('xpkg') - if self.check_not_added: - self.vcs_settings.status.check(checkdir, checkdir_relative, xpkg) - return False - - @property - def runInPkgs(self): - '''Package level scans''' - return (True, [self.check]) diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py index 73187e9..2224fa3 100644 --- a/pym/repoman/scanner.py +++ b/pym/repoman/scanner.py @@ -294,6 +294,10 @@ class Scanner(object): checkdir_relative = os.path.join(".", checkdir_relative) checkdirlist = os.listdir(checkdir) + # Run the status check + if self.checks['ebuild_notadded']: + self.vcs_settings.status.check(checkdir, checkdir_relative, xpkg) + dynamic_data = { 'checkdirlist': ExtendedFuture(checkdirlist), 'checkdir': checkdir, @@ -322,7 +326,7 @@ class Scanner(object): # need to set it up for ==> self.modules or some other ordered list for mod in [('manifests', 'Manifests'), ('isebuild', 'IsEbuild'), ('keywords', 'KeywordChecks'), ('files', 'FileChecks'), - ('vcsstatus', 'VCSStatus'), ('fetches', 'FetchChecks'), + ('fetches', 'FetchChecks'), ('pkgmetadata', 'PkgMetadata'), ]: mod_class = MODULE_CONTROLLER.get_class(mod[0]) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-878311-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BE7EA138206 for <garchives@archives.gentoo.org>; Mon, 25 Apr 2016 16:34:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1FC41E0867; Mon, 25 Apr 2016 16:33:56 +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 93304E0867 for <gentoo-commits@lists.gentoo.org>; Mon, 25 Apr 2016 16:33:55 +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 0230334085D for <gentoo-commits@lists.gentoo.org>; Mon, 25 Apr 2016 16:33:54 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 70A3FD6 for <gentoo-commits@lists.gentoo.org>; Mon, 25 Apr 2016 16:33:51 +0000 (UTC) From: "Brian Dolbec" <dolsen@gentoo.org> 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" <dolsen@gentoo.org> Message-ID: <1461601931.ac6c5aa13a48bc50b1aa5cfc8cb46ad9c8c42a2b.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/, pym/repoman/modules/scan/status/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/modules/scan/status/__init__.py pym/repoman/modules/scan/status/vcsstatus.py pym/repoman/scanner.py X-VCS-Directories: pym/repoman/modules/scan/status/ pym/repoman/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: ac6c5aa13a48bc50b1aa5cfc8cb46ad9c8c42a2b X-VCS-Branch: repoman Date: Mon, 25 Apr 2016 16:33:51 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d3e5e544-b9da-4029-b149-cc8038e1e3f3 X-Archives-Hash: 3f90a6e62ad3ec219012ff68a6a2cf62 Message-ID: <20160425163351.OfBDBokU8sljUB-djvOCMh7up0OjUgQerfTpb2tthY0@z> commit: ac6c5aa13a48bc50b1aa5cfc8cb46ad9c8c42a2b Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Mon Apr 25 16:32:11 2016 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Mon Apr 25 16:32:11 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ac6c5aa1 repoman: Migrate the vcsstatus code back to scanner.py This module had only 2 lines of useful code, the rest was boiler plate module handling code. It was also not dependant on other checks. pym/repoman/modules/scan/status/__init__.py | 31 ---------------------- pym/repoman/modules/scan/status/vcsstatus.py | 39 ---------------------------- pym/repoman/scanner.py | 6 ++++- 3 files changed, 5 insertions(+), 71 deletions(-) diff --git a/pym/repoman/modules/scan/status/__init__.py b/pym/repoman/modules/scan/status/__init__.py deleted file mode 100644 index 1abf580..0000000 --- a/pym/repoman/modules/scan/status/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2015-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -doc = """fetches plug-in module for repoman. -Performs fetch related checks on ebuilds.""" -__doc__ = doc[:] - - -module_spec = { - 'name': 'status', - 'description': doc, - 'provides':{ - 'status-module': { - 'name': "vcsstatus", - 'sourcefile': "vcsstatus", - 'class': "VCSStatus", - 'description': doc, - 'functions': ['check'], - 'func_desc': { - }, - 'mod_kwargs': ['vcs_settings', 'checks', - ], - 'func_kwargs': { - 'checkdir': (None, None), - 'checkdir_relative': (None, None), - 'xpkg': (None, None), - }, - }, - } -} - diff --git a/pym/repoman/modules/scan/status/vcsstatus.py b/pym/repoman/modules/scan/status/vcsstatus.py deleted file mode 100644 index ab81a11..0000000 --- a/pym/repoman/modules/scan/status/vcsstatus.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding:utf-8 -*- - -from repoman.modules.scan.scanbase import ScanBase - - -class VCSStatus(ScanBase): - '''Determines the status of the vcs repositories - to determine if files are not added''' - - def __init__(self, **kwargs): - '''Class init - - @param vcs_settings: VCSSettings instance - ''' - super(VCSStatus, self).__init__(**kwargs) - self.vcs_settings = kwargs.get('vcs_settings') - self.check_not_added = kwargs.get("checks")['ebuild_notadded'] - - def check(self, **kwargs): - '''Performs an indirect status check via the - correct vcs plugin Status class - - @param check_not_added: boolean - @param checkdir: string, directory path - @param checkdir_relative: repolevel determined path - @param xpkg: the current package being checked - @returns: boolean - ''' - checkdir = kwargs.get('checkdir') - checkdir_relative = kwargs.get('checkdir_relative') - xpkg = kwargs.get('xpkg') - if self.check_not_added: - self.vcs_settings.status.check(checkdir, checkdir_relative, xpkg) - return False - - @property - def runInPkgs(self): - '''Package level scans''' - return (True, [self.check]) diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py index 73187e9..2224fa3 100644 --- a/pym/repoman/scanner.py +++ b/pym/repoman/scanner.py @@ -294,6 +294,10 @@ class Scanner(object): checkdir_relative = os.path.join(".", checkdir_relative) checkdirlist = os.listdir(checkdir) + # Run the status check + if self.checks['ebuild_notadded']: + self.vcs_settings.status.check(checkdir, checkdir_relative, xpkg) + dynamic_data = { 'checkdirlist': ExtendedFuture(checkdirlist), 'checkdir': checkdir, @@ -322,7 +326,7 @@ class Scanner(object): # need to set it up for ==> self.modules or some other ordered list for mod in [('manifests', 'Manifests'), ('isebuild', 'IsEbuild'), ('keywords', 'KeywordChecks'), ('files', 'FileChecks'), - ('vcsstatus', 'VCSStatus'), ('fetches', 'FetchChecks'), + ('fetches', 'FetchChecks'), ('pkgmetadata', 'PkgMetadata'), ]: mod_class = MODULE_CONTROLLER.get_class(mod[0])