GNU bug report logs -
#73833
[PATCH] guix: import: composer: Improve composer-fetch.
Previous Next
Full log
Message #36 received at 73833 <at> debbugs.gnu.org (full text, mbox):
Nicolas Graves <ngraves <at> ngraves.fr> skribis:
> * guix/scripts/refresh.scm (options->update-specs)[update-specs]: Keep
> the version field of each update specification. This is done using a
> variable to cache package names and then filter out unwanted candidates.
> ---
> guix/scripts/refresh.scm | 23 +++++++++++++++++------
> 1 file changed, 17 insertions(+), 6 deletions(-)
>
> diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
> index ec7d38c22a..810c33c786 100644
> --- a/guix/scripts/refresh.scm
> +++ b/guix/scripts/refresh.scm
> @@ -310,12 +310,23 @@ (define update-specs
> some)))
>
> (if (assoc-ref opts 'recursive?)
> - (mlet* %store-monad ((edges (node-edges %bag-node-type (all-packages)))
> - (packages -> (node-transitive-edges
> - (map update-spec-package update-specs)
> - edges)))
> - ;; FIXME: The 'version' field of each update spec is lost.
> - (return (map update-spec packages)))
> + (mlet* %store-monad
> + ((edges (node-edges %bag-node-type (all-packages)))
> + (strict-spec-pkgs -> (map update-spec-package update-specs))
> + (strict-spec-pkg-names -> (map package-name strict-spec-pkgs))
> + (packages -> (node-transitive-edges strict-spec-pkgs edges))
> + (transitive-specs -> (map update-spec packages)))
> + (return (append update-specs
> + (filter-map (match-lambda
> + ((? update? spec)
> + (if (member (package-name
> + (update-spec-package spec))
> + strict-spec-pkg-names)
> + spec
> + #f))
> + (_
> + #f))
> + transitive-specs))))
Or just:
(filter (lambda (spec)
(member (package-name (update-spec-package spec))
package-names))
transitive-specs)
(IIUC.)
Maybe add a comment explaining that this is to retain the ‘version’
field of UPDATE-SPECS?
Also, check out the guidelines for identifiers.
Thanks,
Ludo’.
This bug report was last modified 232 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.