From f48624fc68165ca2e002342d6e45511fb5455d83 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 12 Aug 2014 16:10:32 +0200 Subject: guix package: Use 'manifest-add'. * guix/scripts/package.scm (guix-package)[process-actions]: Use 'manifest-add' instead of the equivalent code. --- guix/scripts/package.scm | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 4eb046e1c9..7c3ac24992 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -872,19 +872,8 @@ more information.~%")) (let* ((manifest (profile-manifest profile)) (install (options->installable opts manifest)) (remove (options->removable opts manifest)) - (entries - (append install - (fold (lambda (package result) - (match package - (($ name _ out _ ...) - (filter (negate - (cut same-package? <> - name out)) - result)))) - (manifest-entries - (manifest-remove manifest remove)) - install))) - (new (make-manifest entries))) + (new (manifest-add (manifest-remove manifest remove) + install))) (when (equal? profile %current-profile) (ensure-default-profile)) @@ -914,7 +903,8 @@ more information.~%")) (name (generation-file-name profile (+ 1 number)))) (and (build-derivations (%store) (list prof-drv)) - (let ((count (length entries))) + (let* ((entries (manifest-entries new)) + (count (length entries))) (switch-symlinks name prof) (switch-symlinks profile name) (maybe-register-gc-root (%store) profile) -- cgit 1.4.1