[Frugalware-git] pacman-tools: syncpkgcd: use server.request_confs()

Miklos Vajna vmiklos at frugalware.org
Sat Mar 14 22:35:12 CET 2009


Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-tools.git;a=commitdiff;h=ac79ea0a54ce390f4c98ad5fe4edf1098c18f36d

commit ac79ea0a54ce390f4c98ad5fe4edf1098c18f36d
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Sat Mar 14 22:35:43 2009 +0100

syncpkgcd: use server.request_confs()

- so that ~/.pacman-g2/repos/* will be downloaded to the clients as well

diff --git a/syncpkgd/syncpkgcd.py b/syncpkgd/syncpkgcd.py
index d744450..1e5b41d 100644
--- a/syncpkgd/syncpkgcd.py
+++ b/syncpkgd/syncpkgcd.py
@@ -67,13 +67,15 @@ class Syncpkgcd:
# there is a pkg to build, request
# up to date repo list first
try:
-					buf = server.request_conf()
+					confs = server.request_confs()
except socket.error:
self.sleep("can't download repoman.conf from the server")
continue
-				sock = open(os.path.join(self.home, ".repoman.conf"), "w")
-				sock.write(base64.decodestring(buf))
-				sock.close()
+				os.makedirs(os.path.join(self.home, ".pacman-g2/repos"))
+				for k, v in confs:
+					sock = open(os.path.join(self.home, k), "w")
+					sock.write(base64.decodestring(v))
+					sock.close()
self.build(pkg)
except KeyboardInterrupt:
# here we could abort the current build properly


More information about the Frugalware-git mailing list