* bug#22740: Freshness check blocks upgrading @ 2016-02-19 17:12 Andreas Enge 2016-02-20 6:25 ` Leo Famulari 2016-02-20 8:30 ` Alex Kost 0 siblings, 2 replies; 9+ messages in thread From: Andreas Enge @ 2016-02-19 17:12 UTC (permalink / raw) To: 22740 Hello, when upgrading packages, there is a check for new GNU releases. In the presence of network problems preventing to reach the corresponding servers, the command "guix package -u" hangs indefinitely. It would be nice to add a (short) time-out to the procedure looking for updates, or better yet, to add a command line flag to turn it off: Even when the servers are reachable, checking for new versions takes a considerable amount of time that can be saved in many circumstances. Personally, I would not even mind turning this feature off completely; I think we update packages sufficiently often and the message is rather distracting. Andreas ^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#22740: Freshness check blocks upgrading 2016-02-19 17:12 bug#22740: Freshness check blocks upgrading Andreas Enge @ 2016-02-20 6:25 ` Leo Famulari 2016-02-20 9:13 ` Ricardo Wurmus 2016-02-20 8:30 ` Alex Kost 1 sibling, 1 reply; 9+ messages in thread From: Leo Famulari @ 2016-02-20 6:25 UTC (permalink / raw) To: Andreas Enge; +Cc: 22740 On Fri, Feb 19, 2016 at 06:12:09PM +0100, Andreas Enge wrote: > Hello, > > when upgrading packages, there is a check for new GNU releases. > In the presence of network problems preventing to reach the corresponding > servers, the command "guix package -u" hangs indefinitely. > > It would be nice to add a (short) time-out to the procedure looking > for updates, or better yet, to add a command line flag to turn it off: > Even when the servers are reachable, checking for new versions takes > a considerable amount of time that can be saved in many circumstances. > > Personally, I would not even mind turning this feature off completely; > I think we update packages sufficiently often and the message is rather > distracting. It does seem out of place while upgrading. It could be considered extraneous to the features of `guix refresh`. > > Andreas > > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#22740: Freshness check blocks upgrading 2016-02-20 6:25 ` Leo Famulari @ 2016-02-20 9:13 ` Ricardo Wurmus 0 siblings, 0 replies; 9+ messages in thread From: Ricardo Wurmus @ 2016-02-20 9:13 UTC (permalink / raw) To: Leo Famulari; +Cc: 22740 Leo Famulari <leo@famulari.name> writes: > On Fri, Feb 19, 2016 at 06:12:09PM +0100, Andreas Enge wrote: >> Hello, >> >> when upgrading packages, there is a check for new GNU releases. >> In the presence of network problems preventing to reach the corresponding >> servers, the command "guix package -u" hangs indefinitely. >> >> It would be nice to add a (short) time-out to the procedure looking >> for updates, or better yet, to add a command line flag to turn it off: >> Even when the servers are reachable, checking for new versions takes >> a considerable amount of time that can be saved in many circumstances. >> >> Personally, I would not even mind turning this feature off completely; >> I think we update packages sufficiently often and the message is rather >> distracting. > > It does seem out of place while upgrading. It could be considered > extraneous to the features of `guix refresh`. I agree. It seems to better fit with “guix refresh”. ^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#22740: Freshness check blocks upgrading 2016-02-19 17:12 bug#22740: Freshness check blocks upgrading Andreas Enge 2016-02-20 6:25 ` Leo Famulari @ 2016-02-20 8:30 ` Alex Kost 2016-02-22 21:16 ` Ludovic Courtès 1 sibling, 1 reply; 9+ messages in thread From: Alex Kost @ 2016-02-20 8:30 UTC (permalink / raw) To: Andreas Enge; +Cc: 22740 Andreas Enge (2016-02-19 20:12 +0300) wrote: > Hello, > > when upgrading packages, there is a check for new GNU releases. > In the presence of network problems preventing to reach the corresponding > servers, the command "guix package -u" hangs indefinitely. > > It would be nice to add a (short) time-out to the procedure looking > for updates, or better yet, to add a command line flag to turn it off: > Even when the servers are reachable, checking for new versions takes > a considerable amount of time that can be saved in many circumstances. > > Personally, I would not even mind turning this feature off completely; I totally agree with this! I didn't like it since the very beginning. > I think we update packages sufficiently often and the message is rather > distracting. -- Alex ^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#22740: Freshness check blocks upgrading 2016-02-20 8:30 ` Alex Kost @ 2016-02-22 21:16 ` Ludovic Courtès 2016-02-23 8:54 ` Alex Kost 0 siblings, 1 reply; 9+ messages in thread From: Ludovic Courtès @ 2016-02-22 21:16 UTC (permalink / raw) To: Alex Kost; +Cc: 22740 Alex Kost <alezost@gmail.com> skribis: > Andreas Enge (2016-02-19 20:12 +0300) wrote: > >> Hello, >> >> when upgrading packages, there is a check for new GNU releases. >> In the presence of network problems preventing to reach the corresponding >> servers, the command "guix package -u" hangs indefinitely. >> >> It would be nice to add a (short) time-out to the procedure looking >> for updates, or better yet, to add a command line flag to turn it off: >> Even when the servers are reachable, checking for new versions takes >> a considerable amount of time that can be saved in many circumstances. >> >> Personally, I would not even mind turning this feature off completely; > > I totally agree with this! I didn't like it since the very beginning. I agree. I implemented it mostly for the fun of it and to demonstrate that we could possibly do “clever” things with access to high-level package objects (the command could automatically offer to use the new source instead of the old one), but in practice it’s been largely annoying. Ludo’, waiting for the patch that removes it. :-) ^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#22740: Freshness check blocks upgrading 2016-02-22 21:16 ` Ludovic Courtès @ 2016-02-23 8:54 ` Alex Kost 2016-02-23 9:18 ` Andreas Enge 2016-02-23 17:07 ` Ludovic Courtès 0 siblings, 2 replies; 9+ messages in thread From: Alex Kost @ 2016-02-23 8:54 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 22740 [-- Attachment #1: Type: text/plain, Size: 1344 bytes --] Ludovic Courtès (2016-02-23 00:16 +0300) wrote: > Alex Kost <alezost@gmail.com> skribis: > >> Andreas Enge (2016-02-19 20:12 +0300) wrote: >> >>> Hello, >>> >>> when upgrading packages, there is a check for new GNU releases. >>> In the presence of network problems preventing to reach the corresponding >>> servers, the command "guix package -u" hangs indefinitely. >>> >>> It would be nice to add a (short) time-out to the procedure looking >>> for updates, or better yet, to add a command line flag to turn it off: >>> Even when the servers are reachable, checking for new versions takes >>> a considerable amount of time that can be saved in many circumstances. >>> >>> Personally, I would not even mind turning this feature off completely; >> >> I totally agree with this! I didn't like it since the very beginning. > > I agree. I implemented it mostly for the fun of it and to demonstrate > that we could possibly do “clever” things with access to high-level > package objects (the command could automatically offer to use the new > source instead of the old one), but in practice it’s been largely > annoying. > > Ludo’, waiting for the patch that removes it. :-) Attached. I also removed 'check-package-freshness' from (gnu packages) as it is not used anywhere else, or should it be left? [-- Attachment #2: 0001-Do-not-check-package-freshness-during-upgrade.patch --] [-- Type: text/x-patch, Size: 7685 bytes --] From 1d6d4d0864672b0676f09eb6c8285684e5b8785c Mon Sep 17 00:00:00 2001 From: Alex Kost <alezost@gmail.com> Date: Tue, 23 Feb 2016 11:38:00 +0300 Subject: [PATCH] Do not check package freshness during upgrade. Fixes <http://bugs.gnu.org/22740>. Reported by Andreas Enge <andreas@enge.fr>. * gnu/packages.scm (waiting, ftp-open*, check-package-freshness): Remove. * guix/scripts/package.scm (options->installable): Adjust accordingly. * emacs/guix-main.scm (package->manifest-entry*): Likewise. --- emacs/guix-main.scm | 4 +-- gnu/packages.scm | 69 +----------------------------------------------- guix/scripts/package.scm | 12 +++------ 3 files changed, 6 insertions(+), 79 deletions(-) diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 335686e..11b9c77 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -856,9 +856,7 @@ parameter/value pairs." (define* (package->manifest-entry* package #:optional output) (and package - (begin - (check-package-freshness package) - (package->manifest-entry package output)))) + (package->manifest-entry package output))) (define* (make-install-manifest-entries id #:optional output) (package->manifest-entry* (package-by-id id) output)) diff --git a/gnu/packages.scm b/gnu/packages.scm index b309a78..64a695d 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> +;;; Copyright © 2016 Alex Kost <alezost@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,9 +23,6 @@ #: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 (guix upstream) #:use-module (ice-9 ftw) #:use-module (ice-9 vlist) #:use-module (ice-9 match) @@ -46,8 +44,6 @@ find-best-packages-by-name find-newest-available-packages - check-package-freshness - specification->package specification->package+output)) @@ -280,69 +276,6 @@ return its return value." (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))) - ;; XXX: This could work with non-GNU packages as well. However, - ;; GNU's FTP-based updater would be too slow if it weren't memoized, - ;; and the generic interface in (guix upstream) doesn't support - ;; that. - (match (waiting (latest-release name - #:ftp-open ftp-open* - #:ftp-close (const #f)) - (_ "looking for the latest release of GNU ~a...") name) - ((? upstream-source? source) - (let ((latest-version - (string-append (upstream-source-package source) "-" - (upstream-source-version source)))) - (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)))))) - (define (specification->package spec) "Return a package matching SPEC. SPEC may be a package name, or a package name followed by a hyphen and a version number. If the version number is not diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index b93ffb0..f658343 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2013, 2015 Mark H Weaver <mhw@netris.org> -;;; Copyright © 2014 Alex Kost <alezost@gmail.com> +;;; Copyright © 2014, 2016 Alex Kost <alezost@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -551,10 +551,6 @@ upgrading, #f otherwise." (define (options->installable opts manifest) "Given MANIFEST, the current manifest, and OPTS, the result of 'args-fold', return the new list of manifest entries." - (define (package->manifest-entry* package output) - (check-package-freshness package) - (package->manifest-entry package output)) - (define upgrade? (options->upgrade-predicate opts)) @@ -567,7 +563,7 @@ return the new list of manifest entries." (call-with-values (lambda () (specification->package+output name output)) - package->manifest-entry*)))) + package->manifest-entry)))) (_ #f)) (manifest-entries manifest))) @@ -576,13 +572,13 @@ return the new list of manifest entries." (('install . (? package? p)) ;; When given a package via `-e', install the first of its ;; outputs (XXX). - (package->manifest-entry* p "out")) + (package->manifest-entry p "out")) (('install . (? string? spec)) (if (store-path? spec) (store-item->manifest-entry spec) (let-values (((package output) (specification->package+output spec))) - (package->manifest-entry* package output)))) + (package->manifest-entry package output)))) (_ #f)) opts)) -- 2.6.3 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* bug#22740: Freshness check blocks upgrading 2016-02-23 8:54 ` Alex Kost @ 2016-02-23 9:18 ` Andreas Enge 2016-02-24 15:59 ` Alex Kost 2016-02-23 17:07 ` Ludovic Courtès 1 sibling, 1 reply; 9+ messages in thread From: Andreas Enge @ 2016-02-23 9:18 UTC (permalink / raw) To: Alex Kost; +Cc: 22740 On Tue, Feb 23, 2016 at 11:54:30AM +0300, Alex Kost wrote: > Attached. I also removed 'check-package-freshness' from (gnu packages) > as it is not used anywhere else, or should it be left? I think it is good, please push. (Assuming that "guix refresh" still works and none of the procedures you remove are still used.) One of the procedures has the comment: "This has a noticeable impact when doing "guix upgrade -u"." It looks like we are going way back into the history of guix! Andreas ^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#22740: Freshness check blocks upgrading 2016-02-23 9:18 ` Andreas Enge @ 2016-02-24 15:59 ` Alex Kost 0 siblings, 0 replies; 9+ messages in thread From: Alex Kost @ 2016-02-24 15:59 UTC (permalink / raw) To: 22740 Andreas Enge (2016-02-23 12:18 +0300) wrote: > On Tue, Feb 23, 2016 at 11:54:30AM +0300, Alex Kost wrote: >> Attached. I also removed 'check-package-freshness' from (gnu packages) >> as it is not used anywhere else, or should it be left? > > I think it is good, please push. (Assuming that "guix refresh" still > works and none of the procedures you remove are still used.) Ludovic Courtès (2016-02-23 20:07 +0300) wrote: > Alex Kost <alezost@gmail.com> skribis: > >> Attached. I also removed 'check-package-freshness' from (gnu packages) >> as it is not used anywhere else, or should it be left? > > It’s fine to remove it. The patch committed, thanks. -- Alex ^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#22740: Freshness check blocks upgrading 2016-02-23 8:54 ` Alex Kost 2016-02-23 9:18 ` Andreas Enge @ 2016-02-23 17:07 ` Ludovic Courtès 1 sibling, 0 replies; 9+ messages in thread From: Ludovic Courtès @ 2016-02-23 17:07 UTC (permalink / raw) To: Alex Kost; +Cc: 22740 Alex Kost <alezost@gmail.com> skribis: > Attached. I also removed 'check-package-freshness' from (gnu packages) > as it is not used anywhere else, or should it be left? It’s fine to remove it. > From 1d6d4d0864672b0676f09eb6c8285684e5b8785c Mon Sep 17 00:00:00 2001 > From: Alex Kost <alezost@gmail.com> > Date: Tue, 23 Feb 2016 11:38:00 +0300 > Subject: [PATCH] Do not check package freshness during upgrade. > > Fixes <http://bugs.gnu.org/22740>. > Reported by Andreas Enge <andreas@enge.fr>. > > * gnu/packages.scm (waiting, ftp-open*, check-package-freshness): Remove. > * guix/scripts/package.scm (options->installable): Adjust accordingly. > * emacs/guix-main.scm (package->manifest-entry*): Likewise. OK, thanks! Ludo’. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-02-24 16:00 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-02-19 17:12 bug#22740: Freshness check blocks upgrading Andreas Enge 2016-02-20 6:25 ` Leo Famulari 2016-02-20 9:13 ` Ricardo Wurmus 2016-02-20 8:30 ` Alex Kost 2016-02-22 21:16 ` Ludovic Courtès 2016-02-23 8:54 ` Alex Kost 2016-02-23 9:18 ` Andreas Enge 2016-02-24 15:59 ` Alex Kost 2016-02-23 17:07 ` Ludovic Courtès
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.