commit: 809942064a805e66b7c63ac2e3a5b00287a1fe8b
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 Jun 2 15:42:51 2014 +0000
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=80994206
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 4f25adb..fcf60f7 100755
--- a/pym/repoman/main.py
+++ b/pym/repoman/main.py
@@ -66,7 +66,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
@@ -313,14 +313,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:
@@ -1214,12 +1219,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()