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, 17 Sep 2015 18:58:30 +0000 (UTC)	[thread overview]
Message-ID: <1442514712.1ebdd23d99326330e3b3bda4245b578b5bbf2874.dolsen@gentoo> (raw)

commit:     1ebdd23d99326330e3b3bda4245b578b5bbf2874
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 17 18:31:52 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Sep 17 18:31:52 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=1ebdd23d

repoman/scanner.py: Clean out code separation demarcation lines

These lines were originally used to mark places where code was removed.
And replaced with a class instance and/or function call.

Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

 pym/repoman/scanner.py | 61 ++++++--------------------------------------------
 1 file changed, 7 insertions(+), 54 deletions(-)

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index 781461f..240c949 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -91,13 +91,10 @@ class Scanner(object):
 		self.reposplit = myreporoot.split(os.path.sep)
 		self.repolevel = len(self.reposplit)
 
-		###################
 		if self.options.mode == 'commit':
 			repochecks.commit_check(self.repolevel, self.reposplit)
 			repochecks.conflict_check(self.vcs_settings, self.options)
 
-		###################
-
 		# Make startdir relative to the canonical repodir, so that we can pass
 		# it to digestgen and it won't have to be canonicalized again.
 		if self.repolevel == 1:
@@ -106,8 +103,6 @@ class Scanner(object):
 			startdir = normalize_path(mydir)
 			startdir = os.path.join(
 				self.repo_settings.repodir, *startdir.split(os.sep)[-2 - self.repolevel + 3:])
-		###################
-
 
 		# get lists of valid keywords, licenses, and use
 		new_data = repo_metadata(self.portdb, self.repo_settings.repoman_settings)
@@ -125,20 +120,12 @@ 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)
 
-		####################
-
 		check_profiles(self.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.qatracker = QATracker()
@@ -170,13 +157,9 @@ class Scanner(object):
 		else:
 			print(green("\nRepoMan scours the neighborhood..."))
 
-		#####################
-
 		self.changed = Changes(self.options)
 		self.changed.scan(self.vcs_settings)
 
-		######################
-
 		self.have = {
 			'pmasked': False,
 			'dev_keywords': False,
@@ -197,7 +180,6 @@ class Scanner(object):
 
 		# Disable the "ebuild.notadded" check when not in commit mode and
 		# running `svn status` in every package dir will be too expensive.
-
 		self.check['ebuild_notadded'] = not \
 			(self.vcs_settings.vcs == "svn" and self.repolevel < 3 and self.options.mode != "commit")
 
@@ -209,7 +191,6 @@ class Scanner(object):
 
 		self.live_eclasses = portage.const.LIVE_ECLASSES
 
-		######################
 		# initialize our checks classes here before the big xpkg loop
 		self.manifester = Manifests(self.options, self.qatracker, self.repo_settings.repoman_settings)
 		self.is_ebuild = IsEbuild(self.repo_settings.repoman_settings, self.repo_settings, self.portdb, self.qatracker)
@@ -228,8 +209,6 @@ class Scanner(object):
 		self.descriptioncheck = DescriptionChecks(self.qatracker)
 		self.licensecheck = LicenseChecks(self.qatracker, liclist, liclist_deprecated)
 		self.restrictcheck = RestrictChecks(self.qatracker)
-		######################
-
 
 
 	def scan(self):
@@ -248,19 +227,15 @@ class Scanner(object):
 				checkdir_relative = os.path.join(catdir, checkdir_relative)
 			checkdir_relative = os.path.join(".", checkdir_relative)
 
-		#####################
 			if self.manifester.run(checkdir, self.portdb):
 				continue
 			if not self.manifester.generated_manifest:
 				self.manifester.digest_check(xpkg, checkdir)
-		######################
-
 			if self.options.mode == 'manifest-check':
 				continue
 
 			checkdirlist = os.listdir(checkdir)
 
-		######################
 			pkgs, allvalid = self.is_ebuild.check(checkdirlist, checkdir, xpkg)
 			if self.is_ebuild.continue_:
 				# If we can't access all the metadata then it's totally unsafe to
@@ -270,31 +245,27 @@ class Scanner(object):
 				# positives confuse users.
 				self.can_force = False
 				continue
-		######################
 
 			self.keywordcheck.prepare()
 
 			# Sort ebuilds in ascending order for the KEYWORDS.dropped check.
 			ebuildlist = sorted(pkgs.values())
 			ebuildlist = [pkg.pf for pkg in ebuildlist]
-		#######################
+
 			self.filescheck.check(
 				checkdir, checkdirlist, checkdir_relative, self.changed.changed, self.changed.new)
-		#######################
+
 			self.status_check.check(self.check['ebuild_notadded'], checkdir, checkdir_relative, xpkg)
 			eadded.extend(self.status_check.eadded)
 
-		#################
 			self.fetchcheck.check(
 				xpkg, checkdir, checkdir_relative, self.changed.changed, self.changed.new)
-		#################
 
 			if self.check['changelog'] and "ChangeLog" not in checkdirlist:
 				self.qatracker.add_error("changelog.missing", xpkg + "/ChangeLog")
-		#################
+
 			self.pkgmeta.check(xpkg, checkdir, checkdirlist, self.repolevel)
 			muselist = frozenset(self.pkgmeta.musedict)
-		#################
 
 			changelog_path = os.path.join(checkdir_relative, "ChangeLog")
 			changelog_modified = changelog_path in self.changed.changelogs
@@ -303,11 +274,10 @@ class Scanner(object):
 			used_useflags = set()
 
 			for y_ebuild in ebuildlist:
-				##################
+
 				ebuild = Ebuild(
 					self.repo_settings, self.repolevel, pkgdir, catdir, self.vcs_settings,
 					xpkg, y_ebuild)
-				##################
 
 				if self.check['changelog'] and not changelog_modified \
 					and ebuild.ebuild_path in self.changed.new_ebuilds:
@@ -318,10 +288,9 @@ class Scanner(object):
 					self.qatracker.add_error(
 						"ebuild.notadded", xpkg + "/" + y_ebuild + ".ebuild")
 
-		##################
 				if bad_split_check(xpkg, y_ebuild, pkgdir, self.qatracker):
 					continue
-		###################
+
 				pkg = pkgs[y_ebuild]
 				if pkg_invalid(pkg, self.qatracker, ebuild):
 					allvalid = False
@@ -332,9 +301,7 @@ class Scanner(object):
 				inherited = pkg.inherited
 				live_ebuild = self.live_eclasses.intersection(inherited)
 
-				#######################
 				self.eapicheck.check(pkg, ebuild)
-				#######################
 
 				for k, v in myaux.items():
 					if not isinstance(v, basestring):
@@ -348,9 +315,8 @@ class Scanner(object):
 							(ebuild.relative_path, k, m.start() + 1))
 
 				if not self.fetchcheck.src_uri_error:
-					#######################
 					self.thirdparty.check(myaux, ebuild.relative_path)
-					#######################
+
 				if myaux.get("PROVIDE"):
 					self.qatracker.add_error("virtual.oldstyle", ebuild.relative_path)
 
@@ -370,26 +336,20 @@ class Scanner(object):
 							myqakey = var + ".virtual"
 							self.qatracker.add_error(myqakey, ebuild.relative_path)
 
-				#######################
 				self.descriptioncheck.check(pkg, ebuild)
-				#######################
 
 				keywords = myaux["KEYWORDS"].split()
 
 				ebuild_archs = set(
 					kw.lstrip("~") for kw in keywords if not kw.startswith("-"))
 
-				#######################
 				self.keywordcheck.check(
 					pkg, xpkg, ebuild, y_ebuild, keywords, ebuild_archs, self.changed,
 					live_ebuild, self.repo_metadata['kwlist'], self.profiles)
-				#######################
 
 				if live_ebuild and self.repo_settings.repo_config.name == "gentoo":
-					#######################
 					self.liveeclasscheck.check(
 						pkg, xpkg, ebuild, y_ebuild, keywords, self.repo_metadata['pmaskdict'])
-					#######################
 
 				if self.options.ignore_arches:
 					arches = [[
@@ -540,27 +500,20 @@ class Scanner(object):
 				badlicsyntax = badlicsyntax > 0
 				badprovsyntax = badprovsyntax > 0
 
-				#################
 				self.use_flag_checks.check(pkg, xpkg, ebuild, y_ebuild, muselist)
 
 				ebuild_used_useflags = self.use_flag_checks.getUsedUseFlags()
 				used_useflags = used_useflags.union(ebuild_used_useflags)
-				#################
+
 				self.rubyeclasscheck.check(pkg, ebuild)
-				#################
 
 				# license checks
 				if not badlicsyntax:
-					#################
 					self.licensecheck.check(pkg, xpkg, ebuild, y_ebuild)
-					#################
 
-				#################
 				self.restrictcheck.check(pkg, xpkg, ebuild, y_ebuild)
-				#################
 
 				# Syntax Checks
-
 				if not self.vcs_settings.vcs_preserves_mtime:
 					if ebuild.ebuild_path not in self.changed.new_ebuilds and \
 						ebuild.ebuild_path not in self.changed.ebuilds:


             reply	other threads:[~2015-09-17 18:58 UTC|newest]

Thread overview: 216+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17 18:58 Brian Dolbec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-05-03  9:33 [gentoo-commits] proj/portage:repoman commit in: pym/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-28 15:05 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 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=1442514712.1ebdd23d99326330e3b3bda4245b578b5bbf2874.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