GNU bug report logs -
#26652
[PATCH 0/2] fresh: add -m manifest option.
Previous Next
Reported by: Mathieu Othacehe <m.othacehe <at> gmail.com>
Date: Tue, 25 Apr 2017 12:59:02 UTC
Severity: normal
Tags: patch
Done: Mathieu Othacehe <m.othacehe <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 26652 <at> debbugs.gnu.org (full text, mbox):
Mathieu Othacehe <m.othacehe <at> gmail.com> skribis:
> * guix/profiles.scm (manifest->packages): New exported procedure.
> ---
> guix/profiles.scm | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/guix/profiles.scm b/guix/profiles.scm
> index eb172ef45..157445407 100644
> --- a/guix/profiles.scm
> +++ b/guix/profiles.scm
> @@ -8,6 +8,7 @@
> ;;; Copyright © 2016 Chris Marusich <cmmarusich <at> gmail.com>
> ;;; Copyright © 2017 Huang Ying <huang.ying.caritas <at> gmail.com>
> ;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
> +;;; Copyright © 2017 Mathieu Othacehe <m.othacehe <at> gmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -94,6 +95,7 @@
> profile-manifest
> package->manifest-entry
> packages->manifest
> + manifest->packages
> ca-certificate-bundle
> %default-profile-hooks
> profile-derivation
> @@ -203,6 +205,14 @@ denoting a specific output of a package."
> (package->manifest-entry package)))
> packages)))
>
> +(define (manifest->packages manifest)
> + "Return the list of packages in MANIFEST."
> + (delete-duplicates
> + (filter-map (lambda (entry)
> + (let ((item (manifest-entry-item entry)))
> + (if (package? item) item #f)))
> + (manifest-entries manifest))))
You can remove ‘delete-duplicates’ IMO.
Since this procedure has special semantics (it omits non-package-object
entries), what about keeping it private in (guix scripts refresh)?
Ludo’.
This bug report was last modified 7 years and 354 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.