From 42384b517ed5352bb50fb9c0c5f49b168c198004 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 5 Oct 2018 23:05:19 +0200 Subject: progress: Fix total size in "@ download-succeeded" traces. Fixes a regression introduced in 1d0be47ab680db938ac8da1ee65e1de91e198f67 whereby the total size for directories (coming from substitutes) would be 4KiB. This led the progress bar to go back to the start, typically. * guix/progress.scm (progress-reporter/trace): Add 'total'. In 'start', initialize it. Adjust 'report' to update it. Adjust 'stop' to prefer SIZE as the actual size and then TOTAL. Do not use the size of FILE as the total since that could be 4KiB when FILE is a directory. --- guix/progress.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'guix') diff --git a/guix/progress.scm b/guix/progress.scm index f846944952..9da667a027 100644 --- a/guix/progress.scm +++ b/guix/progress.scm @@ -289,6 +289,8 @@ tasks is performed. Write PREFIX at the beginning of the line." #:optional (log-port (current-output-port))) "Like 'progress-reporter/file', but instead of returning human-readable progress reports, write \"build trace\" lines to be processed elsewhere." + (define total 0) ;bytes transferred + (define (report-progress transferred) (define message (format #f "@ download-progress ~a ~a ~a ~a~%" @@ -299,13 +301,16 @@ progress reports, write \"build trace\" lines to be processed elsewhere." (progress-reporter (start (lambda () + (set! total 0) (display (format #f "@ download-started ~a ~a ~a~%" file url (or size "-")) log-port))) - (report (rate-limited report-progress %progress-interval)) + (report (let ((report (rate-limited report-progress %progress-interval))) + (lambda (transferred) + (set! total transferred) + (report transferred)))) (stop (lambda () - (let ((size (or (and=> (stat file #f) stat:size) - size))) + (let ((size (or size total))) (report-progress size) (display (format #f "@ download-succeeded ~a ~a ~a~%" file url size) -- cgit v1.2.3 From 68afb9dccf91cc1a58b6db405befa176b191d809 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Thu, 4 Oct 2018 11:30:23 -0400 Subject: build-system/glib-or-gtk: Build 'in-source' by default. * guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Change to 'out-of-source? #f'. * gnu/packages/audio.scm (audacity)[arguments]: Use the default 'out-of-source?' setting. * gnu/packages/libreoffice.scm (libreoffice): Likewise. --- gnu/packages/audio.scm | 5 ----- gnu/packages/libreoffice.scm | 3 --- guix/build-system/glib-or-gtk.scm | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) (limited to 'guix') diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 434efab953..17b6363f7c 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -413,11 +413,6 @@ engineers, musicians, soundtrack editors and composers.") (substitute* "src/prefs/MidiIOPrefs.cpp" (("../../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h")) #t))) - ;; The translation Makefile generation is performed improperly for - ;; out-of-tree builds. - ;; XXX This can be removed if the glib-or-gkt-build-system - ;; switches to #:out-of-source? #t. See . - #:out-of-source? #f ;; The test suite is not "well exercised" according to the developers, ;; and fails with various errors. See ;; . diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index 881cf2008d..e5ab5c5071 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -1018,9 +1018,6 @@ converting QuarkXPress file format. It supports versions 3.1 to 4.1.") (arguments `(#:tests? #f ; Building the tests already fails. #:make-flags '("build-nocheck") ; Do not build unit tests, which fails. - ;; XXX Remove this if glib-or-gtk-build-system changes to in-source-tree - ;; builds by default. - #:out-of-source? #f #:phases (modify-phases %standard-phases (add-before 'configure 'prepare-src diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm index 621e68e0ab..fcd92f2334 100644 --- a/guix/build-system/glib-or-gtk.scm +++ b/guix/build-system/glib-or-gtk.scm @@ -112,7 +112,7 @@ (configure-flags ''()) ;; Disable icon theme cache generation. (make-flags ''("gtk_update_icon_cache=true")) - (out-of-source? #t) + (out-of-source? #f) (tests? #t) (test-target "check") (parallel-build? #t) -- cgit v1.2.3