aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-06-20 06:42:39 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-06-20 06:42:39 +0200
commit8b75b01e886f833a9536a8704f959ad8cc6fc1bf (patch)
treee67d3766f09bfb8e88df86ea289655c839dac4ab /web
parentd041b1fc9fc984dbd3b7228549fdecdb2f85c335 (diff)
downloadbuildroot-test-8b75b01e886f833a9536a8704f959ad8cc6fc1bf.tar.gz
buildroot-test-8b75b01e886f833a9536a8704f959ad8cc6fc1bf.tar.bz2
web/import.inc.php: compress files later
It turns out that build-time.log is used in various places in the result importing process, and due to commit d041b1fc9fc984dbd3b7228549fdecdb2f85c335 ("web/import.inc.php: compress some result files"), we are now compressing build-time.log, but a bit too early. Due to this for example, the build duration is no longer calculated. To address this, we compress the files at the very end of the import process, once all the details have been extracted from build-time.log. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'web')
-rw-r--r--web/import.inc.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/web/import.inc.php b/web/import.inc.php
index 5a17735..a9b368f 100644
--- a/web/import.inc.php
+++ b/web/import.inc.php
@@ -154,17 +154,6 @@ function import_result($buildid, $filename)
/* Remove the build.log.bz2 file if it's in there */
system("rm -f " . $thisbuildtmpdir . "build.log.bz2", $retval);
- /* Compress files that are typically too large and infrequently
- used */
- $files_to_compress = array("build-time.log",
- "licenses-manifest.csv",
- "packages-file-list-host.txt",
- "packages-file-list-staging.txt",
- "packages-file-list.txt");
- foreach ($files_to_compress as $f) {
- system("gzip " . $thisbuildtmpdir . $f, $retval);
- }
-
/* Create the 'results/xyz/' directory if it doesn't already
exists */
if (! file_exists($finalbuildresultdir)) {
@@ -254,6 +243,17 @@ function import_result($buildid, $filename)
}
}
+ /* Compress files that are typically too large and infrequently
+ used */
+ $files_to_compress = array("build-time.log",
+ "licenses-manifest.csv",
+ "packages-file-list-host.txt",
+ "packages-file-list-staging.txt",
+ "packages-file-list.txt");
+ foreach ($files_to_compress as $f) {
+ system("gzip " . $thisbuildfinaldir . $f, $retval);
+ }
+
$db = new db();
/* Insert into the database */