Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/checks/ebuilds/, pym/repoman/checks/directories/, pym/repoman/
Date: Wed, 01 Oct 2014 23:02:38
Message-Id: 1412204237.f885ccc4dc4d19668a420793f9a5e5de11f9192e.dol-sen@gentoo
1 commit: f885ccc4dc4d19668a420793f9a5e5de11f9192e
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 2 15:27:32 2014 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Wed Oct 1 22:57:17 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f885ccc4
7
8 Repoman: Fix previous errors introduced
9
10 I mistakenly used vcs_new_changed as a boolean value, passing it around to newly split out code.
11 This corrects it's use to an imported function.
12 This also correct the mychanged, mynew values that were moved to the Changes class.
13 Reverse moving the filescheck to later in the code when mychanged, mynew was defined.
14 Those were different vlaues than what was original for that check.
15 commit: 73e780a802ba843d5778be44c81644a9f909a7bf
16 Subject: repoman: Fix up files check's changeset variable propagation
17 Author: Tom Wijsman <tomwij <AT> gentoo.org> (Mon 02 Jun 2014 08:00:12 AM PDT)
18
19 ---
20 pym/repoman/checks/directories/files.py | 4 ++--
21 pym/repoman/checks/ebuilds/fetches.py | 9 +++++----
22 pym/repoman/main.py | 17 ++++++++---------
23 3 files changed, 15 insertions(+), 15 deletions(-)
24
25 diff --git a/pym/repoman/checks/directories/files.py b/pym/repoman/checks/directories/files.py
26 index 71c01d0..5dfca25 100644
27 --- a/pym/repoman/checks/directories/files.py
28 +++ b/pym/repoman/checks/directories/files.py
29 @@ -8,12 +8,13 @@ import io
30 from portage import _encodings, _unicode_encode
31 from portage import os
32
33 +from repoman.vcs.vcs import vcs_new_changed
34
35
36 class FileChecks(object):
37
38 def __init__(self, qatracker, repoman_settings, repo_settings, portdb,
39 - vcs_settings, vcs_new_changed):
40 + vcs_settings):
41 '''
42 @param qatracker: QATracker instance
43 @param repoman_settings: settings instance
44 @@ -25,7 +26,6 @@ class FileChecks(object):
45 self.repo_settings = repo_settings
46 self.repoman_settings = repoman_settings
47 self.vcs_settings = vcs_settings
48 - self.vcs_new_changed = vcs_new_changed
49
50
51 def check(self, checkdir, checkdirlist, checkdir_relative, changed, new):
52
53 diff --git a/pym/repoman/checks/ebuilds/fetches.py b/pym/repoman/checks/ebuilds/fetches.py
54 index 3d59339..ccf9ff9 100644
55 --- a/pym/repoman/checks/ebuilds/fetches.py
56 +++ b/pym/repoman/checks/ebuilds/fetches.py
57 @@ -8,12 +8,14 @@ from stat import S_ISDIR
58 import portage
59 from portage import os
60
61 +from repoman.vcs.vcs import vcs_new_changed
62 +
63
64 class FetchChecks(object):
65 '''Performs checks on the files needed for the ebuild'''
66
67 def __init__(self, qatracker, repoman_settings, repo_settings, portdb,
68 - vcs_settings, vcs_new_changed):
69 + vcs_settings):
70 '''
71 @param qatracker: QATracker instance
72 @param repoman_settings: settings instance
73 @@ -25,11 +27,10 @@ class FetchChecks(object):
74 self.repo_settings = repo_settings
75 self.repoman_settings = repoman_settings
76 self.vcs_settings = vcs_settings
77 - self.vcs_new_changed = vcs_new_changed
78 self._digests = None
79
80
81 - def check(self, xpkg, checkdir, checkdir_relative):
82 + def check(self, xpkg, checkdir, checkdir_relative, mychanged, mynew):
83 '''Checks the ebuild sources and files for errors
84
85 @param xpkg: the pacakge being checked
86 @@ -108,7 +109,7 @@ class FetchChecks(object):
87 index = self.repo_settings.repo_config.find_invalid_path_char(y)
88 if index != -1:
89 y_relative = os.path.join(checkdir_relative, "files", y)
90 - if self.vcs_settings.vcs is not None and not self.vcs_new_changed(y_relative):
91 + if self.vcs_settings.vcs is not None and not vcs_new_changed(y_relative, mychanged, mynew):
92 # If the file isn't in the VCS new or changed set, then
93 # assume that it's an irrelevant temporary file (Manifest
94 # entries are not generated for file names containing
95
96 diff --git a/pym/repoman/main.py b/pym/repoman/main.py
97 index 3e0e847..583c538 100755
98 --- a/pym/repoman/main.py
99 +++ b/pym/repoman/main.py
100 @@ -67,7 +67,7 @@ from repoman.scan import Changes, scan
101 from repoman._subprocess import repoman_popen, repoman_getstatusoutput
102 from repoman import utilities
103 from repoman.vcs.vcs import (git_supports_gpg_sign, vcs_files_to_cps,
104 - vcs_new_changed, VCSSettings)
105 + VCSSettings)
106 from repoman.vcs.vcsstatus import VCSStatus
107
108
109 @@ -314,14 +314,19 @@ for xpkg in effective_scanlist:
110 ebuildlist = sorted(pkgs.values())
111 ebuildlist = [pkg.pf for pkg in ebuildlist]
112 #######################
113 + filescheck = FileChecks(qatracker, repoman_settings, repo_settings, portdb,
114 + vcs_settings)
115 + filescheck.check(checkdir, checkdirlist, checkdir_relative,
116 + changed.changed, changed.new)
117 +#######################
118 status_check = VCSStatus(vcs_settings, checkdir, checkdir_relative, xpkg, qatracker)
119 status_check.check(check_ebuild_notadded)
120 eadded.extend(status_check.eadded)
121
122 #################
123 fetchcheck = FetchChecks(qatracker, repoman_settings, repo_settings, portdb,
124 - vcs_settings, vcs_new_changed)
125 - fetchcheck.check(xpkg, checkdir, checkdir_relative)
126 + vcs_settings)
127 + fetchcheck.check(xpkg, checkdir, checkdir_relative, changed.changed, changed.new)
128 #################
129
130 if check_changelog and "ChangeLog" not in checkdirlist:
131 @@ -1217,12 +1222,6 @@ else:
132 print()
133 sys.exit(1)
134
135 - #######################
136 - filescheck = FileChecks(qatracker, repoman_settings, repo_settings, portdb,
137 - vcs_settings, vcs_new_changed)
138 - filescheck.check(checkdir, checkdirlist, checkdir_relative, mychanged, mynew)
139 - #######################
140 -
141 # Manifests need to be regenerated after all other commits, so don't commit
142 # them now even if they have changed.
143 mymanifests = set()