* guix pull package output truncated @ 2019-04-13 12:59 mikadoZero 2019-04-17 21:11 ` Ludovic Courtès 0 siblings, 1 reply; 9+ messages in thread From: mikadoZero @ 2019-04-13 12:59 UTC (permalink / raw) To: help-guix Recently the output of guix pull has changed. It no longer gives the complete output for the "New in this revision" section. Is there a flag I can pass to guix pull to turn off this truncation. I found it informative to be able to see all the packages that were being added and upgraded and would like to continue to be able to see all the packages. Looking at "4.6 Invoking ‘guix pull’" of the manual I do not see such a flag documented. Here is an example where the output is being truncated to 12 packages. New in this revision: 19 new packages: emacs-evil-exchange, emacs-evil-expat, emacs-evil-indent-plus, emacs-evil-lion, emacs-evil-nerd-commenter, emacs-evil-replace-with-register, emacs-evil-text-object-python, emacs-evil-visual-replace, emacs-evil-visualstar, emacs-janpath-evil-numbers, ghc-libffi, httrack, … 53 packages upgraded: acpica@20190405, ansible@2.7.10, arm-trusted-firmware-sun50i-a64@2.1, autojump@22.5.3, beep@1.4.4, c-reduce@2.8.0, cifs-utils@6.9, clamav@0.101.2, duplicity@0.7.18.2, emacs-direnv@1.5.0, emacs-minimal@26.2, emacs-no-x-toolkit@26.2, … ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guix pull package output truncated 2019-04-13 12:59 guix pull package output truncated mikadoZero @ 2019-04-17 21:11 ` Ludovic Courtès 2019-04-17 22:44 ` Tobias Geerinckx-Rice 2019-04-18 2:07 ` mikadoZero 0 siblings, 2 replies; 9+ messages in thread From: Ludovic Courtès @ 2019-04-17 21:11 UTC (permalink / raw) To: mikadoZero; +Cc: help-guix Hello! mikadoZero <mikadozero@yandex.com> skribis: > Recently the output of guix pull has changed. It no longer gives the > complete output for the "New in this revision" section. For the record, I did that after seeing that, when you don’t upgrade every two days or so, your screen could easily be filled by tens of lines of packages. > Is there a flag I can pass to guix pull to turn off this truncation. I > found it informative to be able to see all the packages that were being > added and upgraded and would like to continue to be able to see all the > packages. There’s currently no flag to change this behavior. Instead, you have to run ‘guix pull -l’ but it’s arguably not very convenient. Perhaps we could add an environment variable specifying whether/how to truncate? I’d keep the default as it is now. Thoughts? Ludo’. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guix pull package output truncated 2019-04-17 21:11 ` Ludovic Courtès @ 2019-04-17 22:44 ` Tobias Geerinckx-Rice 2019-04-18 15:25 ` Ludovic Courtès 2019-04-18 2:07 ` mikadoZero 1 sibling, 1 reply; 9+ messages in thread From: Tobias Geerinckx-Rice @ 2019-04-17 22:44 UTC (permalink / raw) To: help-guix [-- Attachment #1: Type: text/plain, Size: 730 bytes --] Sleepy hullo, Ludovic Courtès wrote: > There’s currently no flag to change this behavior. Instead, you > have to > run ‘guix pull -l’ but it’s arguably not very convenient. > > Perhaps we could add an environment variable specifying > whether/how to > truncate? I’d keep the default as it is now. AIUC, this list of changes is displayed once and then ‘lost’ (to the average user) when they clear their screen, right? Or is there a command that returns this nice list of differences between two guix-profiles that we could suggest running when the default is truncated? It could default to current and current-1, and would solve both (minor) irritations. Am I making sense? T G-R [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 227 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guix pull package output truncated 2019-04-17 22:44 ` Tobias Geerinckx-Rice @ 2019-04-18 15:25 ` Ludovic Courtès 2019-04-18 16:29 ` Pierre Neidhardt 2019-04-18 17:27 ` Tobias Geerinckx-Rice 0 siblings, 2 replies; 9+ messages in thread From: Ludovic Courtès @ 2019-04-18 15:25 UTC (permalink / raw) To: Tobias Geerinckx-Rice; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 2520 bytes --] Howdy! Tobias Geerinckx-Rice <me@tobias.gr> skribis: > Ludovic Courtès wrote: >> There’s currently no flag to change this behavior. Instead, you >> have to >> run ‘guix pull -l’ but it’s arguably not very convenient. >> >> Perhaps we could add an environment variable specifying whether/how >> to >> truncate? I’d keep the default as it is now. > > AIUC, this list of changes is displayed once and then ‘lost’ (to the > average user) when they clear their screen, right? Yup. > Or is there a command that returns this nice list of differences > between two guix-profiles that we could suggest running when the > default is truncated? It could default to current and current-1, and > would solve both (minor) irritations. I think that’s a good idea. What about a ‘--news’ option along with a hint as in the attached patch? --8<---------------cut here---------------start------------->8--- $ guix pull --news New in this revision: 9 new packages: cl-log4cl, ecl-log4cl, emacs-ace-jump-mode, emacs-ace-link, libomp, lucene++, mate-power-manager, poedit, sbcl-log4cl 63 packages upgraded: aj-snapshot@0.9.9, avrdude@6.3, bridge-utils@1.6, burp@2.3.4, calf@0.90.2, certbot@0.33.1, cl-bordeaux-threads@0.8.6-1.5dce49f, conky@1.11.3, connman@1.37, csound@6.12.2, darktable@2.6.2, docker-cli@18.09.5, docker@18.09.5, dungeon-crawl-stone-soup-tiles@0.23.2, dungeon-crawl-stone-soup@0.23.2, ecl-bordeaux-threads@0.8.6-1.5dce49f, eolie@0.9.60, etl@1.2.2, eyed3@0.8.10, fswatch@1.14.0, gtkwave@3.3.100, guix@0.16.0-13.b8b1e4d, highlight@3.50, http-parser@2.9.2, hypre-openmpi@2.15.1, hypre@2.15.1, java-openmpi@4.0.1, khal@0.10.1, knot@2.8.1, libmbim@1.18.2, libqmi@1.22.4, libwacom@0.33, lm-sensors@3.5.0, meld@3.20.1, minetest@5.0.1, musl@1.1.22, ncdc@1.21, ncmpc@0.34, nginx@1.15.12, openmpi-thread-multiple@4.0.1, openmpi@4.0.1, perl-net-dns@1.20, python-acme@0.33.1, python-dask@1.2.0, python-pygit2@0.28.0, python2-dask@1.2.0, python2-pygit2@0.28.0, qjackctl@0.5.7, qsynth@0.5.6, quilt@0.66, rubberband@1.8.2, rust@1.34.0, sbcl-bordeaux-threads@0.8.6-1.5dce49f, singular@4.1.2p1, snd@19.3, socat@1.7.3.3, spice-gtk@0.36, synfig@1.2.2, synfigstudio@1.2.2, the-legend-of-edgar@1.31, toxic@0.8.3, wireshark@3.0.1, yubikey-personalization@1.19.3 --8<---------------cut here---------------end--------------->8--- I’ll push it with documentation if there are no objections. Thanks! Ludo’. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Type: text/x-patch, Size: 5761 bytes --] diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 71e13686c0..fe6ebb1656 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -117,6 +117,9 @@ Download and deploy the latest version of Guix.\n")) (lambda (opt name arg result) (cons `(query list-generations ,(or arg "")) result))) + (option '(#\N "news") #f #f + (lambda (opt name arg result) + (cons '(query display-news) result))) (option '("url") #t #f (lambda (opt name arg result) (alist-cons 'repository-url arg @@ -162,25 +165,28 @@ Download and deploy the latest version of Guix.\n")) (define indirect-root-added (store-lift add-indirect-root)) -(define (display-profile-news profile) +(define* (display-profile-news profile #:key concise? + current-is-newer?) "Display what's up in PROFILE--new packages, and all that." (match (memv (generation-number profile) (reverse (profile-generations profile))) ((current previous _ ...) - (newline) - (let ((old (fold-available-packages - (lambda* (name version result - #:key supported? deprecated? - #:allow-other-keys) - (if (and supported? (not deprecated?)) - (alist-cons name version result) - result)) - '())) - (new (profile-package-alist - (generation-file-name profile current)))) - (display-new/upgraded-packages old new - #:concise? #t - #:heading (G_ "New in this revision:\n")))) + (let ((these (fold-available-packages + (lambda* (name version result + #:key supported? deprecated? + #:allow-other-keys) + (if (and supported? (not deprecated?)) + (alist-cons name version result) + result)) + '())) + (those (profile-package-alist + (generation-file-name profile current)))) + (let ((old (if current-is-newer? those these)) + (new (if current-is-newer? these those))) + (display-new/upgraded-packages old new + #:concise? concise? + #:heading + (G_ "New in this revision:\n"))))) (_ #t))) (define* (build-and-install instances profile @@ -196,7 +202,8 @@ true, display what would be built without actually building it." #:hooks %channel-profile-hooks #:dry-run? dry-run?) (munless dry-run? - (return (display-profile-news profile)) + (return (newline)) + (return (display-profile-news profile #:concise? #t)) (match (which "guix") (#f (return #f)) (str @@ -394,9 +401,13 @@ display long package lists that would fill the user's screen." column) 4)) + (define concise/max-item-count + ;; Maximum number of items to display when CONCISE? is true. + 12) + (define list->enumeration (if concise? - (lambda* (lst #:optional (max 12)) + (lambda* (lst #:optional (max concise/max-item-count)) (if (> (length lst) max) (string-append (string-join (take lst max) ", ") ", " (ellipsis)) @@ -404,10 +415,13 @@ display long package lists that would fill the user's screen." (cut string-join <> ", "))) (let-values (((new upgraded) (new/upgraded-packages alist1 alist2))) + (define new-count (length new)) + (define upgraded-count (length upgraded)) + (unless (and (null? new) (null? upgraded)) (display heading)) - (match (length new) + (match new-count (0 #t) (count (format #t (N_ " ~h new package: ~a~%" @@ -415,14 +429,20 @@ display long package lists that would fill the user's screen." count (pretty (list->enumeration (sort (map first new) string<?)) 30)))) - (match (length upgraded) + (match upgraded-count (0 #t) (count (format #t (N_ " ~h package upgraded: ~a~%" " ~h packages upgraded: ~a~%" count) count (pretty (list->enumeration (sort upgraded string<?)) - 35)))))) + 35)))) + + (when (and concise? + (or (> new-count concise/max-item-count) + (> upgraded-count concise/max-item-count))) + (display-hint (G_ "Run @command{guix pull --news} to view the complete +list of package changes."))))) (define (display-profile-content-diff profile gen1 gen2) "Display the changes in PROFILE GEN2 compared to generation GEN1." @@ -462,7 +482,12 @@ display long package lists that would fill the user's screen." (() (exit 1)) ((numbers ...) - (list-generations profile numbers))))))))) + (list-generations profile numbers))))))) + (('display-news) + ;; Display profile news, with the understanding that this process + ;; represents the newest generation. + (display-profile-news profile + #:current-is-newer? #t)))) (define (channel-list opts) "Return the list of channels to use. If OPTS specify a channel file, ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: guix pull package output truncated 2019-04-18 15:25 ` Ludovic Courtès @ 2019-04-18 16:29 ` Pierre Neidhardt 2019-04-19 12:12 ` Ludovic Courtès 2019-04-18 17:27 ` Tobias Geerinckx-Rice 1 sibling, 1 reply; 9+ messages in thread From: Pierre Neidhardt @ 2019-04-18 16:29 UTC (permalink / raw) To: Ludovic Courtès, Tobias Geerinckx-Rice; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 287 bytes --] Would be nice if `guix pull --news` would take two optional arguments: OLD-COMMIT NEW-COMMIT NEW-COMMIT defaulting to the latest, and OLD-COMMIT defaulting to latest-1. This way we could "diff" the news for any Guix generation. -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guix pull package output truncated 2019-04-18 16:29 ` Pierre Neidhardt @ 2019-04-19 12:12 ` Ludovic Courtès 2019-04-19 13:02 ` Pierre Neidhardt 0 siblings, 1 reply; 9+ messages in thread From: Ludovic Courtès @ 2019-04-19 12:12 UTC (permalink / raw) To: Pierre Neidhardt; +Cc: help-guix Pierre Neidhardt <mail@ambrevar.xyz> skribis: > Would be nice if `guix pull --news` would take two optional arguments: > > OLD-COMMIT NEW-COMMIT I don’t think this should be in terms of commits, or it would be a very different tool (like Tobias writes, it would have to build/download these commits.) Rather, ‘guix pull’ should work in terms of generations. One can already run ‘guix pull -l 42..77’ for example, which does more or less what you suggest. That said, we can improve things incrementally, and I though that the proposed ‘guix pull --news’ would address the problem initially discussed. :-) Thanks, Ludo’. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guix pull package output truncated 2019-04-19 12:12 ` Ludovic Courtès @ 2019-04-19 13:02 ` Pierre Neidhardt 0 siblings, 0 replies; 9+ messages in thread From: Pierre Neidhardt @ 2019-04-19 13:02 UTC (permalink / raw) To: Ludovic Courtès; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 633 bytes --] Ludovic Courtès <ludo@gnu.org> writes: > I don’t think this should be in terms of commits, or it would be a very > different tool (like Tobias writes, it would have to build/download > these commits.) Rather, ‘guix pull’ should work in terms of > generations. Sorry, yes, that's what I meant. > One can already run ‘guix pull -l 42..77’ for example, which does more > or less what you suggest. Essentially what's missing here is the ability to say guix pull -l -2..-1 where -2 and -1 are the second to last and the last generations, respectively. -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guix pull package output truncated 2019-04-18 15:25 ` Ludovic Courtès 2019-04-18 16:29 ` Pierre Neidhardt @ 2019-04-18 17:27 ` Tobias Geerinckx-Rice 1 sibling, 0 replies; 9+ messages in thread From: Tobias Geerinckx-Rice @ 2019-04-18 17:27 UTC (permalink / raw) To: Ludovic Courtès; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 591 bytes --] Ludo', Wow! That was quick. Nice. Pierre Neidhardt wrote: > Would be nice if `guix pull --news` would take two optional > arguments: > > OLD-COMMIT NEW-COMMIT > > NEW-COMMIT defaulting to the latest, and OLD-COMMIT defaulting > to > latest-1. > This way we could "diff" the news for any Guix generation. Yep, that's what I tried to mean. It would probably need to download+build OLD-COMMIT if you've never pulled it before, but that's better than another build farm dependency. OTOH, my idle musings weren't meant as feature request so anything's an improvemnt. Thanks! T G-R [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 227 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: guix pull package output truncated 2019-04-17 21:11 ` Ludovic Courtès 2019-04-17 22:44 ` Tobias Geerinckx-Rice @ 2019-04-18 2:07 ` mikadoZero 1 sibling, 0 replies; 9+ messages in thread From: mikadoZero @ 2019-04-18 2:07 UTC (permalink / raw) To: Ludovic Courtès; +Cc: help-guix Thank you for pointing out `guix pull -l` for this. Ludovic Courtès writes: > Hello! > > mikadoZero <mikadozero@yandex.com> skribis: > >> Recently the output of guix pull has changed. It no longer gives the >> complete output for the "New in this revision" section. > > For the record, I did that after seeing that, when you don’t upgrade > every two days or so, your screen could easily be filled by tens of > lines of packages. > >> Is there a flag I can pass to guix pull to turn off this truncation. I >> found it informative to be able to see all the packages that were being >> added and upgraded and would like to continue to be able to see all the >> packages. > > There’s currently no flag to change this behavior. Instead, you have to > run ‘guix pull -l’ but it’s arguably not very convenient. > > Perhaps we could add an environment variable specifying whether/how to > truncate? I’d keep the default as it is now. > > Thoughts? > > Ludo’. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-04-19 13:02 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-04-13 12:59 guix pull package output truncated mikadoZero 2019-04-17 21:11 ` Ludovic Courtès 2019-04-17 22:44 ` Tobias Geerinckx-Rice 2019-04-18 15:25 ` Ludovic Courtès 2019-04-18 16:29 ` Pierre Neidhardt 2019-04-19 12:12 ` Ludovic Courtès 2019-04-19 13:02 ` Pierre Neidhardt 2019-04-18 17:27 ` Tobias Geerinckx-Rice 2019-04-18 2:07 ` mikadoZero
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).