From b211a66163afd18b282a787e2841a79fbcdb6877 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Sun, 17 Aug 2014 21:49:16 +0400 Subject: packages: Remove dead code. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages.scm (_): Remove. Remove an extra space. Signed-off-by: Ludovic Courtès --- gnu/packages.scm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gnu') diff --git a/gnu/packages.scm b/gnu/packages.scm index 77d9d3ee82..83093a4b6d 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -50,8 +50,6 @@ ;;; ;;; Code: -(define _ (cut gettext <> "guix")) - ;; By default, we store patches and bootstrap binaries alongside Guile ;; modules. This is so that these extra files can be found without ;; requiring a special setup, such as a specific installation directory @@ -60,7 +58,7 @@ (define %patch-path (make-parameter - (map (cut string-append <> "/gnu/packages/patches") + (map (cut string-append <> "/gnu/packages/patches") %load-path))) (define %bootstrap-binaries-path -- cgit 1.4.1 From 4ea444198da3467ce74480d25a9f69dbafaccc4f Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Sat, 16 Aug 2014 22:00:34 +0400 Subject: Move 'check-package-freshness' from 'guix package' to 'packages'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/scripts/package.scm (%sigint-prompt, call-with-sigint-handler) (waiting, ftp-open*, check-package-freshness): Move to... * gnu/packages.scm: ... here. Signed-off-by: Ludovic Courtès --- gnu/packages.scm | 84 +++++++++++++++++++++++++++++++++++++++++++++++- guix/scripts/package.scm | 79 --------------------------------------------- 2 files changed, 83 insertions(+), 80 deletions(-) (limited to 'gnu') diff --git a/gnu/packages.scm b/gnu/packages.scm index 83093a4b6d..14ad75561c 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -22,6 +22,8 @@ #:use-module (guix packages) #:use-module (guix ui) #:use-module (guix utils) + #:use-module ((guix ftp-client) #:select (ftp-open)) + #:use-module (guix gnu-maintenance) #:use-module (ice-9 ftw) #:use-module (ice-9 vlist) #:use-module (ice-9 match) @@ -41,7 +43,9 @@ package-direct-dependents package-transitive-dependents - package-covering-dependents)) + package-covering-dependents + + check-package-freshness)) ;;; Commentary: ;;; @@ -244,3 +248,81 @@ include all of PACKAGES and all packages that depend on PACKAGES." (lambda (node) (vhash-refq dependency-dag node)) ;; Start with the dependents to avoid including PACKAGES in the result. (package-direct-dependents packages)))) + + +(define %sigint-prompt + ;; The prompt to jump to upon SIGINT. + (make-prompt-tag "interruptible")) + +(define (call-with-sigint-handler thunk handler) + "Call THUNK and return its value. Upon SIGINT, call HANDLER with the signal +number in the context of the continuation of the call to this function, and +return its return value." + (call-with-prompt %sigint-prompt + (lambda () + (sigaction SIGINT + (lambda (signum) + (sigaction SIGINT SIG_DFL) + (abort-to-prompt %sigint-prompt signum))) + (dynamic-wind + (const #t) + thunk + (cut sigaction SIGINT SIG_DFL))) + (lambda (k signum) + (handler signum)))) + +(define-syntax-rule (waiting exp fmt rest ...) + "Display the given message while EXP is being evaluated." + (let* ((message (format #f fmt rest ...)) + (blank (make-string (string-length message) #\space))) + (display message (current-error-port)) + (force-output (current-error-port)) + (call-with-sigint-handler + (lambda () + (dynamic-wind + (const #f) + (lambda () exp) + (lambda () + ;; Clear the line. + (display #\cr (current-error-port)) + (display blank (current-error-port)) + (display #\cr (current-error-port)) + (force-output (current-error-port))))) + (lambda (signum) + (format (current-error-port) " interrupted by signal ~a~%" SIGINT) + #f)))) + +(define ftp-open* + ;; Memoizing version of `ftp-open'. The goal is to avoid initiating a new + ;; FTP connection for each package, esp. since most of them are to the same + ;; server. This has a noticeable impact when doing "guix upgrade -u". + (memoize ftp-open)) + +(define (check-package-freshness package) + "Check whether PACKAGE has a newer version available upstream, and report +it." + ;; TODO: Automatically inject the upstream version when desired. + + (catch #t + (lambda () + (when (false-if-exception (gnu-package? package)) + (let ((name (package-name package)) + (full-name (package-full-name package))) + (match (waiting (latest-release name + #:ftp-open ftp-open* + #:ftp-close (const #f)) + (_ "looking for the latest release of GNU ~a...") name) + ((latest-version . _) + (when (version>? latest-version full-name) + (format (current-error-port) + (_ "~a: note: using ~a \ +but ~a is available upstream~%") + (location->string (package-location package)) + full-name latest-version))) + (_ #t))))) + (lambda (key . args) + ;; Silently ignore networking errors rather than preventing + ;; installation. + (case key + ((getaddrinfo-error ftp-error) #f) + (else (apply throw key args)))))) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 75ab118900..c33fd7b605 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -29,7 +29,6 @@ #:use-module (guix config) #:use-module (guix scripts build) #:use-module ((guix build utils) #:select (directory-exists? mkdir-p)) - #:use-module ((guix ftp-client) #:select (ftp-open)) #:use-module (ice-9 format) #:use-module (ice-9 match) #:use-module (ice-9 regex) @@ -42,7 +41,6 @@ #:use-module (gnu packages) #:use-module ((gnu packages base) #:select (guile-final)) #:use-module ((gnu packages bootstrap) #:select (%bootstrap-guile)) - #:use-module (guix gnu-maintenance) #:export (specification->package+output guix-package)) @@ -215,48 +213,6 @@ RX." (package-name p2)))) same-location?)) -(define %sigint-prompt - ;; The prompt to jump to upon SIGINT. - (make-prompt-tag "interruptible")) - -(define (call-with-sigint-handler thunk handler) - "Call THUNK and return its value. Upon SIGINT, call HANDLER with the signal -number in the context of the continuation of the call to this function, and -return its return value." - (call-with-prompt %sigint-prompt - (lambda () - (sigaction SIGINT - (lambda (signum) - (sigaction SIGINT SIG_DFL) - (abort-to-prompt %sigint-prompt signum))) - (dynamic-wind - (const #t) - thunk - (cut sigaction SIGINT SIG_DFL))) - (lambda (k signum) - (handler signum)))) - -(define-syntax-rule (waiting exp fmt rest ...) - "Display the given message while EXP is being evaluated." - (let* ((message (format #f fmt rest ...)) - (blank (make-string (string-length message) #\space))) - (display message (current-error-port)) - (force-output (current-error-port)) - (call-with-sigint-handler - (lambda () - (dynamic-wind - (const #f) - (lambda () exp) - (lambda () - ;; Clear the line. - (display #\cr (current-error-port)) - (display blank (current-error-port)) - (display #\cr (current-error-port)) - (force-output (current-error-port))))) - (lambda (signum) - (format (current-error-port) " interrupted by signal ~a~%" SIGINT) - #f)))) - (define-syntax-rule (leave-on-EPIPE exp ...) "Run EXP... in a context when EPIPE errors are caught and lead to 'exit' with successful exit code. This is useful when writing to the standard output @@ -320,41 +276,6 @@ an output path different than CURRENT-PATH." (not (string=? current-path candidate-path)))))) (#f #f))) -(define ftp-open* - ;; Memoizing version of `ftp-open'. The goal is to avoid initiating a new - ;; FTP connection for each package, esp. since most of them are to the same - ;; server. This has a noticeable impact when doing "guix upgrade -u". - (memoize ftp-open)) - -(define (check-package-freshness package) - "Check whether PACKAGE has a newer version available upstream, and report -it." - ;; TODO: Automatically inject the upstream version when desired. - - (catch #t - (lambda () - (when (false-if-exception (gnu-package? package)) - (let ((name (package-name package)) - (full-name (package-full-name package))) - (match (waiting (latest-release name - #:ftp-open ftp-open* - #:ftp-close (const #f)) - (_ "looking for the latest release of GNU ~a...") name) - ((latest-version . _) - (when (version>? latest-version full-name) - (format (current-error-port) - (_ "~a: note: using ~a \ -but ~a is available upstream~%") - (location->string (package-location package)) - full-name latest-version))) - (_ #t))))) - (lambda (key . args) - ;; Silently ignore networking errors rather than preventing - ;; installation. - (case key - ((getaddrinfo-error ftp-error) #f) - (else (apply throw key args)))))) - ;;; ;;; Search paths. -- cgit 1.4.1 From cc69516cdd7f51c0012bf9e96cad1e2c9a9de927 Mon Sep 17 00:00:00 2001 From: Jason Self Date: Wed, 20 Aug 2014 09:06:25 -0700 Subject: gnu: ffmpeg: Update to 2.3.3. * gnu/packages/video.scm (ffmpeg): Update to version 2.3.3. --- gnu/packages/video.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 23c63fabdb..2873c49e3b 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -58,14 +58,14 @@ (define-public ffmpeg (package (name "ffmpeg") - (version "2.3.1") + (version "2.3.3") (source (origin (method url-fetch) (uri (string-append "http://www.ffmpeg.org/releases/ffmpeg-" version ".tar.bz2")) (sha256 (base32 - "10w1sw5c9qjlaqlr77r3znzm7y0y9qpkni0mfr9rhij22562yspf")))) + "0ik4c06anh49r5b0d3rq9if4zl6ysjsa341655kzw22fl880sk5v")))) (build-system gnu-build-system) (inputs `(("fontconfig" ,fontconfig) -- cgit 1.4.1 From 460f97f8fd2b212ea28e64952fad172f7fef4913 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sat, 23 Aug 2014 20:26:28 -0400 Subject: gnu: libgcrypt-1.5: Update to 1.5.4. * gnu/packages/gnupg.scm (libgcrypt-1.5): Update to 1.5.4. --- gnu/packages/gnupg.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 384ec6289e..3207c74b0b 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -96,7 +96,7 @@ generation.") (define-public libgcrypt-1.5 (package (inherit libgcrypt) - (version "1.5.3") + (version "1.5.4") (source (origin (method url-fetch) @@ -104,7 +104,7 @@ generation.") version ".tar.bz2")) (sha256 (base32 - "1lar8y3lh61zl5flljpz540d78g99h4d5idfwrfw8lm3gm737xdw")))))) + "0czvqxkzd5y872ipy6s010ifwdwv29sqbnqc4pf56sd486gqvy6m")))))) (define-public libassuan (package -- cgit 1.4.1 From f0dafadcfc0336e8d437f39c3563029eaa0f7953 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sat, 23 Aug 2014 20:31:47 -0400 Subject: gnu: libgc-7.2: Update to 7.2f. * gnu/packages/bdw-gc.scm (libgc-7.2): Update to 7.2f. --- gnu/packages/bdw-gc.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm index fb3c43da89..ebb02b1d74 100644 --- a/gnu/packages/bdw-gc.scm +++ b/gnu/packages/bdw-gc.scm @@ -26,14 +26,14 @@ (define-public libgc-7.2 (package (name "libgc") - (version "7.2e") + (version "7.2f") (source (origin (method url-fetch) (uri (string-append "http://www.hboehm.info/gc/gc_source/gc-" version ".tar.gz")) (sha256 (base32 - "0jxgr71rhk58dzc1ihqs51vldh2qs1m154bn41qh6q1dm145nc89")))) + "119x7p1cqw40mpwj80xfq879l9m1dkc7vbc1f3bz3kvkf8bf6p16")))) (build-system gnu-build-system) (arguments ;; Make it so that we don't rely on /proc. This is especially useful in -- cgit 1.4.1