[buildbot] phase2: rely on rsync to merge updated SDK components

LEDE Commits lede-commits at lists.infradead.org
Mon Feb 6 04:30:32 PST 2017


jow pushed a commit to buildbot.git, branch master:
https://git.lede-project.org/2615ef07ba8545f3dbec4d31b40e801e8fe1f541

commit 2615ef07ba8545f3dbec4d31b40e801e8fe1f541
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Mon Feb 6 13:30:09 2017 +0100

    phase2: rely on rsync to merge updated SDK components
    
    Relying on the file modtime is unreliable so we cannot trust tar's
    --keep-newer-files to properly overwrite changed SDK components.
    
    Extract into a different directory instead and use rsync with checksum
    mode to replace updated SDK files.
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 phase2/master.cfg | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/phase2/master.cfg b/phase2/master.cfg
index c46de83..b60417a 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -278,7 +278,13 @@ for arch in arches:
 	factory.addStep(ShellCommand(
 		name = "unpacksdk",
 		description = "Unpacking SDK archive",
-		command = ["tar", "--keep-newer-files", "--strip-components=1", "-C", "sdk/", "-vxf", "sdk.archive"],
+		command = "rm -rf sdk_update && mkdir sdk_update && tar --strip-components=1 -C sdk_update/ -vxf sdk.archive",
+		haltOnFailure = True))
+
+	factory.addStep(ShellCommand(
+		name = "updatesdk",
+		description = "Updating SDK",
+		command = "rsync --checksum -av sdk_update/ sdk/ && rm -rf sdk_update",
 		haltOnFailure = True))
 
 	factory.addStep(FileDownload(mastersrc=home_dir+'/key-build', slavedest="sdk/key-build", mode=0600))



More information about the lede-commits mailing list