phase2: reset error log list on each build
authorJo-Philipp Wich <jo@mein.io>
Sat, 10 Nov 2018 13:05:00 +0000 (14:05 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sat, 10 Nov 2018 13:05:00 +0000 (14:05 +0100)
The OpenWrt buildroot only ever appends to error.txt, but never clears it.

This causes slaves with persistent build environments to keep uploading
build logs of suceeding packages over and over, even if they've long been
fixed already.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
phase2/master.cfg

index 150e96134a78360553cd5a233d057d5a57d1d574..9ce8f5005f83c008ce2f822970ba043c5baca15d 100644 (file)
@@ -336,6 +336,14 @@ for arch in arches:
                workdir = "build/sdk",
                command = ["./scripts/feeds", "install", "-a"]))
 
+       factory.addStep(ShellCommand(
+               name = "logclear",
+               description = "Clearing failure log list",
+               workdir = "build/sdk",
+               command = ["rm", "-f", "logs/package/error.txt"],
+               haltOnFailure = False
+       ))
+
        factory.addStep(ShellCommand(
                name = "compile",
                description = "Building packages",