1 |
commit: ad0e3e17558f34e3c404a855109ec3dddbc38a01 |
2 |
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 30 09:17:57 2020 +0000 |
4 |
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 30 09:17:57 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=ad0e3e17 |
7 |
|
8 |
Fixme list for f_update_db_packages |
9 |
|
10 |
Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org> |
11 |
|
12 |
buildbot_gentoo_ci/config/builders.py | 10 ++++++++-- |
13 |
buildbot_gentoo_ci/config/buildfactory.py | 8 -------- |
14 |
buildbot_gentoo_ci/config/buildfactorys.py | 28 ++++++++++++++++++++++++++++ |
15 |
buildbot_gentoo_ci/config/workers.py | 1 + |
16 |
4 files changed, 37 insertions(+), 10 deletions(-) |
17 |
|
18 |
diff --git a/buildbot_gentoo_ci/config/builders.py b/buildbot_gentoo_ci/config/builders.py |
19 |
index b663fba..114bb83 100644 |
20 |
--- a/buildbot_gentoo_ci/config/builders.py |
21 |
+++ b/buildbot_gentoo_ci/config/builders.py |
22 |
@@ -2,8 +2,14 @@ |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
from buildbot.plugins import util |
26 |
-from buildbot_gentoo_ci.config import buildfactory |
27 |
+from buildbot_gentoo_ci.config import buildfactorys |
28 |
|
29 |
def gentoo_builders(b=[]): |
30 |
- b.append(util.BuilderConfig(name='update_db_packages', workername='updatedb_1', factory=buildfactory.f_update_db_packages())) |
31 |
+ # FIXME: get workers from db |
32 |
+ b.append(util.BuilderConfig( |
33 |
+ name='update_db_packages', |
34 |
+ workername=[ 'updatedb_1', ], |
35 |
+ factory=buildfactorys.f_update_db_packages() |
36 |
+ ) |
37 |
+ ) |
38 |
return b |
39 |
|
40 |
diff --git a/buildbot_gentoo_ci/config/buildfactory.py b/buildbot_gentoo_ci/config/buildfactory.py |
41 |
deleted file mode 100644 |
42 |
index 0943031..0000000 |
43 |
--- a/buildbot_gentoo_ci/config/buildfactory.py |
44 |
+++ /dev/null |
45 |
@@ -1,8 +0,0 @@ |
46 |
-# Copyright 2020 Gentoo Authors |
47 |
-# Distributed under the terms of the GNU General Public License v2 |
48 |
- |
49 |
-from buildbot.plugins import util |
50 |
- |
51 |
-def f_update_db_packages(): |
52 |
- f = util.BuildFactory() |
53 |
- return f |
54 |
|
55 |
diff --git a/buildbot_gentoo_ci/config/buildfactorys.py b/buildbot_gentoo_ci/config/buildfactorys.py |
56 |
new file mode 100644 |
57 |
index 0000000..ef479a2 |
58 |
--- /dev/null |
59 |
+++ b/buildbot_gentoo_ci/config/buildfactorys.py |
60 |
@@ -0,0 +1,28 @@ |
61 |
+# Copyright 2020 Gentoo Authors |
62 |
+# Distributed under the terms of the GNU General Public License v2 |
63 |
+ |
64 |
+from buildbot.plugins import util, steps |
65 |
+ |
66 |
+def f_update_db_packages(): |
67 |
+ f = util.BuildFactory() |
68 |
+ # FIXME: |
69 |
+ # Get base project from db |
70 |
+ # Check if base project repo for is cloned |
71 |
+ # Check if gentoo repo is cloned |
72 |
+ # check if the profile link is there |
73 |
+ # check if etc/portage has no error |
74 |
+ # Get the repository some way |
75 |
+ repository=util.Property('repository') |
76 |
+ # For loop |
77 |
+ # for cpv in util.Property('cpv_changes') |
78 |
+ # check if not categorys in db |
79 |
+ # run update categorys db step |
80 |
+ # check if not package in db |
81 |
+ # run update package db step |
82 |
+ # and get foo{cpv] with metadata back |
83 |
+ # if new or updated package |
84 |
+ # else |
85 |
+ # run update package db step in a pool of workers |
86 |
+ # and get foo{cpv] with metadata back |
87 |
+ # if new or updated package |
88 |
+ return f |
89 |
|
90 |
diff --git a/buildbot_gentoo_ci/config/workers.py b/buildbot_gentoo_ci/config/workers.py |
91 |
index 50a4751..3005129 100644 |
92 |
--- a/buildbot_gentoo_ci/config/workers.py |
93 |
+++ b/buildbot_gentoo_ci/config/workers.py |
94 |
@@ -4,5 +4,6 @@ |
95 |
from buildbot.plugins import worker |
96 |
|
97 |
def gentoo_workers(w=[]): |
98 |
+ # FIXME: Get workers from db |
99 |
w.append(worker.LocalWorker('updatedb_1')) |
100 |
return w |