guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] profiles: Report about upgrades.


From: Alex Kost
Subject: Re: [PATCH] profiles: Report about upgrades.
Date: Sun, 31 Aug 2014 10:04:05 +0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Ludovic Courtès (2014-08-30 23:56 +0400) wrote:

> Alex Kost <address@hidden> skribis:
>
>> +  (let* ((remove (manifest-matching-entries
>> +                  manifest (manifest-transaction-remove transaction)))
>> +         (install/upgrade (manifest-transaction-install transaction))
>> +         (install '())
>> +         (upgrade (append-map
>> +                   (lambda (entry)
>> +                     (let ((matching
>> +                            (manifest-matching-entries
>> +                             manifest
>> +                             (list (manifest-pattern
>> +                                    (name   (manifest-entry-name entry))
>> +                                    (output (manifest-entry-output 
>> entry)))))))
>> +                       (when (null? matching)
>> +                         (set! install (cons entry install)))
>> +                       matching))
>> +                   install/upgrade)))
>
> Somehow I had overlooked the ‘set!’ here.  ;-)  I’ve just added an
> auxiliary procedure, ‘manifest-transaction-effects’, which does that in
> a functional way.  Let me know if there’s anything wrong.

Sorry, I didn't know how to avoid ‘set!’ there.

But is it correct to report it like that?  I mean if a user has
“guile-1.8.8” and installs “guile-2.0.9” then (with your variant) he
gets:

--8<---------------cut here---------------start------------->8---
The following package will be upgraded:
   guile-2.0.9  out     /gnu/store/...
--8<---------------cut here---------------end--------------->8---

I thought it should be:

--8<---------------cut here---------------start------------->8---
The following package will be upgraded:
   guile-1.8.8  out     /gnu/store/...
--8<---------------cut here---------------end--------------->8---

Actually that's why (to avoid possible confusion) I initially suggested:

--8<---------------cut here---------------start------------->8---
The following package will be upgraded (removed):
   guile-1.8.8  out     /gnu/store/...

The following package will be installed:
   guile-2.0.9  out     /gnu/store/...
--8<---------------cut here---------------end--------------->8---

--
Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]