From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: guix package conflict Date: Sun, 11 Aug 2019 15:00:20 -0400 Message-ID: <87r25ra5nk.fsf@netris.org> References: <87y301v5hb.fsf@elephly.net> <87mugh8hqn.fsf@zancanaro.id.au> <87ef1rmx4p.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42097) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwt59-0004BG-BB for help-guix@gnu.org; Sun, 11 Aug 2019 15:00:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwt58-0007bM-5m for help-guix@gnu.org; Sun, 11 Aug 2019 15:00:43 -0400 Received: from world.peace.net ([64.112.178.59]:48972) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hwt58-0007b5-1f for help-guix@gnu.org; Sun, 11 Aug 2019 15:00:42 -0400 In-Reply-To: <87ef1rmx4p.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Sun, 11 Aug 2019 19:26:30 +0200") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Pierre Neidhardt Cc: help-guix@gnu.org, Andy Tai Pierre Neidhardt writes: > Carlo Zancanaro 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