Exemplo n.º 1
0
 def __init__(self, config, settings, version):
     PokerRsync.__init__(
         self, config, settings, Constants.RSYNC + Constants.EXCLUDES + [
             "--dry-run", "-av", "--delete", "--progress",
             "--log-format=FILE:%f", "@SOURCE@/" + version + "/", "@TARGET@"
         ])
     self.files_count = 0
     self.files_total = 0.0
Exemplo n.º 2
0
 def __init__(self, config, settings, version, files_total):
     PokerRsync.__init__(
         self, config, settings,
         Constants.RSYNC + Constants.EXCLUDES + Constants.BANDWIDTH + [
             "--only-write-batch=%s/patch" % Constants.UPGRADES_DIR,
             "--delete", "-a", "--log-format=FILE:%f",
             "@SOURCE@/" + version + "/", "@TARGET@"
         ])
     self.files_count = 0
     self.files_total = files_total
Exemplo n.º 3
0
 def __init__(self, config, settings, version, callback):
     if match(".*::", settings.headerGet("/settings/rsync/@source")):
         PokerRsync.__init__(self, config, settings, Constants.RSYNC + [ "@SOURCE@/" ])
     else:
         PokerRsync.__init__(self, config, settings, Constants.RSYNC + [ '--dry-run', '--list-only', "@SOURCE@/", "/most/unlikely/directory" ])
     self.version_compare = "%03d%03d%03d" % version
     self.version = version
     if self.verbose > 1:
         self.message("CheckClientVersion checking version %s against server" % str(self.version))
     self.callback = callback
     self.spawn()
     self.need_upgrade = False
     self.version_matched = False
Exemplo n.º 4
0
 def upgradeStage2(self, version, files_count):
     self.publishEvent(TICK, 0.0, "Upgrading the upgrade system")
     rsync = PokerRsync(
         self.config, self.settings,
         Constants.RSYNC + Constants.EXCLUDES + Constants.BANDWIDTH + [
             "--delete", "-a", "@SOURCE@/" + "%s/%s/" %
             (version, self.upgrades), Constants.UPGRADES_DIR
         ])
     rsync.registerHandler(RSYNC_DONE,
                           lambda: self.upgradeStage3(version, files_count))
     rsync.registerHandler(RSYNC_FAILED, self.failed)
     rsync.spawn()
Exemplo n.º 5
0
 def __init__(self, config, settings, version, callback):
     if match(".*::", settings.headerGet("/settings/rsync/@source")):
         PokerRsync.__init__(self, config, settings,
                             Constants.RSYNC + ["@SOURCE@/"])
     else:
         PokerRsync.__init__(
             self, config, settings, Constants.RSYNC + [
                 '--dry-run', '--list-only', "@SOURCE@/",
                 "/most/unlikely/directory"
             ])
     self.version_compare = "%03d%03d%03d" % version
     self.version = version
     if self.verbose > 1:
         self.message(
             "CheckClientVersion checking version %s against server" %
             str(self.version))
     self.callback = callback
     self.spawn()
     self.need_upgrade = False
     self.version_matched = False
Exemplo n.º 6
0
 def __init__(self, config, settings, version):
     PokerRsync.__init__(self, config, settings, Constants.RSYNC + Constants.EXCLUDES + [ "--dry-run", "-av", "--delete", "--progress", "--log-format=FILE:%f", "@SOURCE@/" + version + "/", "@TARGET@" ])
     self.files_count = 0
     self.files_total = 0.0
Exemplo n.º 7
0
 def upgradeStage2(self, version, files_count):
     self.publishEvent(TICK, 0.0, "Upgrading the upgrade system")
     rsync = PokerRsync(self.config, self.settings, Constants.RSYNC + Constants.EXCLUDES + Constants.BANDWIDTH + [ "--delete", "-a", "@SOURCE@/" + "%s/%s/" % ( version, self.upgrades ), Constants.UPGRADES_DIR ])
     rsync.registerHandler(RSYNC_DONE, lambda: self.upgradeStage3(version, files_count))
     rsync.registerHandler(RSYNC_FAILED, self.failed)
     rsync.spawn()
Exemplo n.º 8
0
 def spawn(self):
     self.publishEvent(TICK, 0.0, "Retrieving the client upgrade")
     PokerRsync.spawn(self)
Exemplo n.º 9
0
 def __init__(self, config, settings, version, files_total):
     PokerRsync.__init__(self, config, settings, Constants.RSYNC + Constants.EXCLUDES + Constants.BANDWIDTH + [ "--only-write-batch=%s/patch" % Constants.UPGRADES_DIR, "--delete", "-a", "--log-format=FILE:%f", "@SOURCE@/" + version + "/", "@TARGET@" ])
     self.files_count = 0
     self.files_total = files_total
Exemplo n.º 10
0
 def spawn(self):
     self.publishEvent(TICK, 0.0, "Looking for the new client upgrade")
     PokerRsync.spawn(self)
Exemplo n.º 11
0
 def spawn(self):
     self.publishEvent(TICK, 0.0, "Retrieving the client upgrade")
     PokerRsync.spawn(self)
Exemplo n.º 12
0
 def spawn(self):
     self.publishEvent(TICK, 0.0, "Looking for the new client upgrade")
     PokerRsync.spawn(self)