Gentoo Archives: gentoo-commits

From: Magnus Granberg <zorry@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/zorry:master commit in: gobs/pym/
Date: Tue, 01 May 2012 00:16:12
Message-Id: 1335831346.dd38e1fe6839e6d5c018fc99fae687e0c0a7eeaa.zorry@gentoo
1 commit: dd38e1fe6839e6d5c018fc99fae687e0c0a7eeaa
2 Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 1 00:15:46 2012 +0000
4 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
5 CommitDate: Tue May 1 00:15:46 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/zorry.git;a=commit;h=dd38e1fe
7
8 Remove code that is not needed (sync stuff)
9
10 ---
11 gobs/pym/check_setup.py | 11 -----------
12 gobs/pym/pgsql.py | 32 +-------------------------------
13 2 files changed, 1 insertions(+), 42 deletions(-)
14
15 diff --git a/gobs/pym/check_setup.py b/gobs/pym/check_setup.py
16 index 8f8aa87..c0ba2ee 100644
17 --- a/gobs/pym/check_setup.py
18 +++ b/gobs/pym/check_setup.py
19 @@ -4,7 +4,6 @@ import os
20 import errno
21 from git import *
22 from gobs.text import get_file_text
23 -from gobs.sync import sync_tree
24
25 from gobs.readconf import get_conf_settings
26 reader=get_conf_settings()
27 @@ -16,13 +15,6 @@ CM=connectionManager(gobs_settings_dict)
28 if CM.getName()=='pgsql':
29 from gobs.pgsql import *
30
31 -def git_pull():
32 - repo = Repo("/var/cache/gobs/" + gobs_settings_dict['gobs_gitreponame'] + "/")
33 - repo_remote = repo.remotes.origin
34 - repo_remote.pull()
35 - master = repo.head.reference
36 - print(master.log())
37 -
38 def check_make_conf():
39 # FIXME: mark any config updating true in the db when updating the configs
40 # Get the config list
41 @@ -69,9 +61,6 @@ def check_make_conf_guest(config_profile):
42 make_conf_checksum_db = get_profile_checksum(conn,config_profile)
43 print('make_conf_checksum_db', make_conf_checksum_db)
44 if make_conf_checksum_db is None:
45 - if get_profile_sync(conn, config_profile) is True:
46 - if sync_tree():
47 - reset_profile_sync(conn, config_profile)
48 CM.putConnection(conn)
49 return False
50 make_conf_file = "/etc/portage/make.conf"
51
52 diff --git a/gobs/pym/pgsql.py b/gobs/pym/pgsql.py
53 index 64f1b46..67451bb 100644
54 --- a/gobs/pym/pgsql.py
55 +++ b/gobs/pym/pgsql.py
56 @@ -9,40 +9,10 @@ def get_default_config(connection):
57
58 def get_profile_checksum(connection, config_profile):
59 cursor = connection.cursor()
60 - sqlQ = "SELECT make_conf_checksum FROM configs WHERE active = 'True' AND id = %s AND updateing = 'False' AND sync = 'False'"
61 + sqlQ = "SELECT make_conf_checksum FROM configs WHERE active = 'True' AND id = %s AND auto = 'True'"
62 cursor.execute(sqlQ, (config_profile,))
63 return cursor.fetchone()
64
65 -def get_profile_sync(connection, config_profile):
66 - cursor = connection.cursor()
67 - sqlQ = "SELECT sync FROM configs WHERE active = 'True' AND id = %s AND updateing = 'False'"
68 - cursor.execute(sqlQ, (config_profile,))
69 - return cursor.fetchone()
70 -
71 -def set_profile_sync(connection):
72 - cursor = connection.cursor()
73 - sqlQ = "UPDATE configs SET sync = 'True' WHERE active = 'True'"
74 - cursor.execute(sqlQ)
75 - connection.commit()
76 -
77 -def reset_profile_sync(connection, config_profile):
78 - cursor = connection.cursor()
79 - sqlQ = "UPDATE configs SET sync = 'False' WHERE active = 'True' AND id = %s"
80 - cursor.execute(sqlQ, (config_profile,))
81 - connection.commit()
82 -
83 -def set_profile_updating(connection):
84 - cursor = connection.cursor()
85 - sqlQ = "UPDATE configs SET updating = 'True' WHERE active = 'True'"
86 - cursor.execute(sqlQ)
87 - connection.commit()
88 -
89 -def reset_profile_sync(connection, config_profile):
90 - cursor = connection.cursor()
91 - sqlQ = "UPDATE configs SET updating = 'False' WHERE active = 'True'"
92 - cursor.execute(sqlQ)
93 - connection.commit()
94 -
95 def get_packages_to_build(connection, config_profile):
96 cursor =connection.cursor()
97 # no point in returning dead ebuilds, to just chuck em out later