public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/checks/ebuilds/, pym/repoman/checks/directories/, pym/repoman/
Date: Mon, 17 Nov 2014 00:55:24 +0000 (UTC)	[thread overview]
Message-ID: <1416185592.6584c3f32a94840f5e2879def055c53158a0b940.dol-sen@gentoo> (raw)

commit:     6584c3f32a94840f5e2879def055c53158a0b940
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 15:27:32 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon Nov 17 00:53:12 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6584c3f3

Repoman: Fix previous errors introduced

I mistakenly used vcs_new_changed as a boolean value, passing it around to newly split out code.
This corrects it's use to an imported function.
This also correct the mychanged, mynew values that were moved to the Changes class.
Reverse moving the filescheck to later in the code when mychanged, mynew was defined.
Those were different vlaues than what was original for that check.
commit:  73e780a802ba843d5778be44c81644a9f909a7bf
Subject: repoman: Fix up files check's changeset variable propagation
Author: Tom Wijsman <tomwij <AT> gentoo.org> (Mon 02 Jun 2014 08:00:12 AM PDT)

---
 pym/repoman/checks/directories/files.py |  4 ++--
 pym/repoman/checks/ebuilds/fetches.py   |  9 +++++----
 pym/repoman/main.py                     | 17 ++++++++---------
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/pym/repoman/checks/directories/files.py b/pym/repoman/checks/directories/files.py
index 71c01d0..5dfca25 100644
--- a/pym/repoman/checks/directories/files.py
+++ b/pym/repoman/checks/directories/files.py
@@ -8,12 +8,13 @@ import io
 from portage import _encodings, _unicode_encode
 from portage import os
 
+from repoman.vcs.vcs import vcs_new_changed
 
 
 class FileChecks(object):
 
 	def __init__(self, qatracker, repoman_settings, repo_settings, portdb,
-		vcs_settings, vcs_new_changed):
+		vcs_settings):
 		'''
 		@param qatracker: QATracker instance
 		@param repoman_settings: settings instance
@@ -25,7 +26,6 @@ class FileChecks(object):
 		self.repo_settings = repo_settings
 		self.repoman_settings = repoman_settings
 		self.vcs_settings = vcs_settings
-		self.vcs_new_changed = vcs_new_changed
 
 
 	def check(self, checkdir, checkdirlist, checkdir_relative, changed, new):

diff --git a/pym/repoman/checks/ebuilds/fetches.py b/pym/repoman/checks/ebuilds/fetches.py
index 3d59339..ccf9ff9 100644
--- a/pym/repoman/checks/ebuilds/fetches.py
+++ b/pym/repoman/checks/ebuilds/fetches.py
@@ -8,12 +8,14 @@ from stat import S_ISDIR
 import portage
 from portage import os
 
+from repoman.vcs.vcs import vcs_new_changed
+
 
 class FetchChecks(object):
 	'''Performs checks on the files needed for the ebuild'''
 
 	def __init__(self, qatracker, repoman_settings, repo_settings, portdb,
-		vcs_settings, vcs_new_changed):
+		vcs_settings):
 		'''
 		@param qatracker: QATracker instance
 		@param repoman_settings: settings instance
@@ -25,11 +27,10 @@ class FetchChecks(object):
 		self.repo_settings = repo_settings
 		self.repoman_settings = repoman_settings
 		self.vcs_settings = vcs_settings
-		self.vcs_new_changed = vcs_new_changed
 		self._digests = None
 
 
-	def check(self, xpkg, checkdir, checkdir_relative):
+	def check(self, xpkg, checkdir, checkdir_relative, mychanged, mynew):
 		'''Checks the ebuild sources and files for errors
 
 		@param xpkg: the pacakge being checked
@@ -108,7 +109,7 @@ class FetchChecks(object):
 				index = self.repo_settings.repo_config.find_invalid_path_char(y)
 				if index != -1:
 					y_relative = os.path.join(checkdir_relative, "files", y)
-					if self.vcs_settings.vcs is not None and not self.vcs_new_changed(y_relative):
+					if self.vcs_settings.vcs is not None and not vcs_new_changed(y_relative, mychanged, mynew):
 						# If the file isn't in the VCS new or changed set, then
 						# assume that it's an irrelevant temporary file (Manifest
 						# entries are not generated for file names containing

diff --git a/pym/repoman/main.py b/pym/repoman/main.py
index 3e0e847..583c538 100755
--- a/pym/repoman/main.py
+++ b/pym/repoman/main.py
@@ -67,7 +67,7 @@ from repoman.scan import Changes, scan
 from repoman._subprocess import repoman_popen, repoman_getstatusoutput
 from repoman import utilities
 from repoman.vcs.vcs import (git_supports_gpg_sign, vcs_files_to_cps,
-	vcs_new_changed, VCSSettings)
+	VCSSettings)
 from repoman.vcs.vcsstatus import VCSStatus
 
 
@@ -314,14 +314,19 @@ for xpkg in effective_scanlist:
 	ebuildlist = sorted(pkgs.values())
 	ebuildlist = [pkg.pf for pkg in ebuildlist]
 #######################
+	filescheck = FileChecks(qatracker, repoman_settings, repo_settings, portdb,
+		vcs_settings)
+	filescheck.check(checkdir, checkdirlist, checkdir_relative,
+		changed.changed, changed.new)
+#######################
 	status_check = VCSStatus(vcs_settings, checkdir, checkdir_relative, xpkg, qatracker)
 	status_check.check(check_ebuild_notadded)
 	eadded.extend(status_check.eadded)
 
 #################
 	fetchcheck = FetchChecks(qatracker, repoman_settings, repo_settings, portdb,
-		vcs_settings, vcs_new_changed)
-	fetchcheck.check(xpkg, checkdir, checkdir_relative)
+		vcs_settings)
+	fetchcheck.check(xpkg, checkdir, checkdir_relative, changed.changed, changed.new)
 #################
 
 	if check_changelog and "ChangeLog" not in checkdirlist:
@@ -1217,12 +1222,6 @@ else:
 			print()
 			sys.exit(1)
 
-	#######################
-	filescheck = FileChecks(qatracker, repoman_settings, repo_settings, portdb,
-		vcs_settings, vcs_new_changed)
-	filescheck.check(checkdir, checkdirlist, checkdir_relative, mychanged, mynew)
-	#######################
-
 	# Manifests need to be regenerated after all other commits, so don't commit
 	# them now even if they have changed.
 	mymanifests = set()


             reply	other threads:[~2014-11-17  0:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17  0:55 Brian Dolbec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-10-01 23:46 [gentoo-commits] proj/portage:repoman commit in: pym/repoman/checks/ebuilds/, pym/repoman/checks/directories/, pym/repoman/ Brian Dolbec
2014-10-01 23:02 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=1416185592.6584c3f32a94840f5e2879def055c53158a0b940.dol-sen@gentoo \
    --to=brian.dolbec@gmail.com \
    --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