Use --delay-updates on rsync upload to minimize time of inconsistency in the repo
authorFelix Fietkau <nbd@nbd.name>
Fri, 6 May 2016 09:14:04 +0000 (10:14 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 10 May 2016 21:27:14 +0000 (23:27 +0200)
During the rsync operation, package lists could go out of sync with the
.ipk files, or a mirror might be pulling an incomplete list of files.
To reduce the chance of this happening, let rsync put all updated files
into place at the end of the transfer

Signed-off-by: Felix Fietkau <nbd@nbd.name>
phase1/master.cfg
phase2/master.cfg

index 4a990137fdd0034d07bec900683bc1a2797e6f87..e9e955632ad803d7a4c187524fd6247d6141f8a3 100644 (file)
@@ -412,7 +412,7 @@ EOT''' %(ts[0], ts[0], ts[1]) ))
        factory.addStep(ShellCommand(
                name = "targetupload",
                description = "Uploading target files",
-               command=["rsync", "--delete", "-avz", "bin/targets/%s/%s/" %(ts[0], ts[1]), "%s/targets/%s/%s/" %(rsync_url, ts[0], ts[1])],
+               command=["rsync", "--delete", "--delay-updates", "-avz", "bin/targets/%s/%s/" %(ts[0], ts[1]), "%s/targets/%s/%s/" %(rsync_url, ts[0], ts[1])],
                env={'RSYNC_PASSWORD': rsync_key},
                haltOnFailure = True,
                logEnviron = False
@@ -422,7 +422,7 @@ EOT''' %(ts[0], ts[0], ts[1]) ))
                factory.addStep(ShellCommand(
                        name = "packageupload",
                        description = "Uploading package files",
-                       command=["rsync", "--delete", "-avz", "bin/packages/", "%s/packages/" %(rsync_url)],
+                       command=["rsync", "--delete", "--delay-updates", "-avz", "bin/packages/", "%s/packages/" %(rsync_url)],
                        env={'RSYNC_PASSWORD': rsync_key},
                        haltOnFailure = False,
                        logEnviron = False
@@ -433,7 +433,7 @@ EOT''' %(ts[0], ts[0], ts[1]) ))
                factory.addStep(ShellCommand(
                        name = "upload",
                        description = "Uploading logs",
-                       command=["rsync", "--delete", "-avz", "logs/", "%s/logs/%s/%s/" %(rsync_url, ts[0], ts[1])],
+                       command=["rsync", "--delete", "--delay-updates", "-avz", "logs/", "%s/logs/%s/%s/" %(rsync_url, ts[0], ts[1])],
                        env={'RSYNC_PASSWORD': rsync_key},
                        haltOnFailure = False,
                        alwaysRun = True,
index 0ad5f361f6e0983c0ac2f8773a37ad0e48aa0e10..41d50c892e6c8abcae708cfa781838b0f5448af0 100644 (file)
@@ -204,7 +204,7 @@ for arch in arches:
                name = "packageupload",
                description = "Uploading package files",
                workdir = "build/sdk",
-               command = ["rsync", "--delete", "-avz", "bin/packages/%s/" %(arch[0]), "%s/packages/%s/" %(rsync_url, arch[0])],
+               command = ["rsync", "--delete", "--delay-updates", "-avz", "bin/packages/%s/" %(arch[0]), "%s/packages/%s/" %(rsync_url, arch[0])],
                env={'RSYNC_PASSWORD': rsync_key},
                haltOnFailure = True,
                logEnviron = False
@@ -240,7 +240,7 @@ for arch in arches:
                name = "logupload",
                description = "Uploading failure logs",
                workdir = "build/sdk",
-               command = ["rsync", "--delete", "-avz", "faillogs/", "%s/faillogs/%s/" %(rsync_url, arch[0])],
+               command = ["rsync", "--delete", "--delay-updates", "-avz", "faillogs/", "%s/faillogs/%s/" %(rsync_url, arch[0])],
                env={'RSYNC_PASSWORD': rsync_key},
                haltOnFailure = False,
                logEnviron = False