GNU bug report logs - #26757
[PATCH 1/2] profiles: Add manifest->packages.

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <m.othacehe <at> gmail.com>

Date: Wed, 3 May 2017 11:31:04 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <m.othacehe <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26757 in the body.
You can then email your comments to 26757 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#26757; Package guix-patches. (Wed, 03 May 2017 11:31:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mathieu Othacehe <m.othacehe <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 03 May 2017 11:31:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <m.othacehe <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Mathieu Othacehe <m.othacehe <at> gmail.com>
Subject: [PATCH 1/2] profiles: Add manifest->packages.
Date: Wed,  3 May 2017 13:29:55 +0200
* 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))))
+
 (define (manifest->gexp manifest)
   "Return a representation of MANIFEST as a gexp."
   (define (entry->gexp entry)
-- 
2.12.2





bug closed, send any further explanations to 26757 <at> debbugs.gnu.org and Mathieu Othacehe <m.othacehe <at> gmail.com> Request was from Mathieu Othacehe <m.othacehe <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 03 May 2017 11:50:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 01 Jun 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.