all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: help-guix@gnu.org, Andy Tai <atai@atai.org>
Subject: Re: guix package conflict
Date: Sun, 11 Aug 2019 15:00:20 -0400	[thread overview]
Message-ID: <87r25ra5nk.fsf@netris.org> (raw)
In-Reply-To: <87ef1rmx4p.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Sun, 11 Aug 2019 19:26:30 +0200")

Pierre Neidhardt <mail@ambrevar.xyz> writes:

> Carlo Zancanaro <carlo@zancanaro.id.au> writes:
>
>> It looks like `guix package -u` compares the version of the 
>> package, and only updates if the package's version has changed 
>> (and even then, only if it has increased).

What leads you to believe this?

I think you're mistaken, based both on past experience and also from
examining the current code.  The relevant procedure is
'transaction-upgrade-entry' in (guix scripts package), here:

  https://git.savannah.gnu.org/cgit/guix.git/tree/guix/scripts/package.scm?id=c383c36edeb7eb358f142c52276d6e5d32bda044#n225

You can see there where 'version-compare' is used to compare the
candidate version and the existing version.  If the version numbers are
equal, then the derivation output paths are compared.  If the output
paths differ, the new version will be reinstalled.

This is certainly the behavior I remember from using --upgrade myself
during the early years of Guix, although in recent years I've been
using the declarative approach to maintain my profile, using
"guix package --manifest".

>> This means that if a 
>> package's inputs (and thus its store hash) have changed, but its 
>> version has not, the version left in the profile will have 
>> outdated inputs, which can conflict if they are propagated. So 
>> `guix package -u` doesn't fix this problem.
>>
>> `guix package -i`, on the other hand, just installs whatever it's 
>> told to, so it will install the same package at the same version, 
>> but with updated inputs. Then all the propagated inputs end up 
>> being the same, so there is no conflict.
>
> I didn't know that! O.o
> Is this documented in the manual?

I hope not.  If it truly behaves the way Carlo described, it's a bug.

     Thanks,
       Mark

  reply	other threads:[~2019-08-11 19:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-10  5:24 guix package conflict Andy Tai
2019-08-10  7:34 ` Ricardo Wurmus
2019-08-10  9:58   ` Carlo Zancanaro
2019-08-11  7:18     ` Andy Tai
2019-08-11 17:26     ` Pierre Neidhardt
2019-08-11 19:00       ` Mark H Weaver [this message]
2019-08-11 21:01         ` Carlo Zancanaro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r25ra5nk.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=atai@atai.org \
    --cc=help-guix@gnu.org \
    --cc=mail@ambrevar.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.