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

> Alex Kost <alez...@gmail.com> 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