[Top][All Lists]

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

Re: enchant hash, fail to upgrade

From: Julien Lepiller
Subject: Re: enchant hash, fail to upgrade
Date: Sun, 22 Sep 2019 23:30:24 +0200
User-agent: K-9 Mail for Android

Le 22 septembre 2019 21:22:45 GMT+02:00, Catriel <address@hidden> a écrit :
>after a minor nuisanse (*) with guix pull, I stumble upon an error:
>$guix upgrade --fallback
>guix upgrade: aviso: paquete 'libstdc++' ya no existe
>guix upgrade: el paquete 'sbcl-next' ha sido reemplazado por 'next'
>substitute: updating substitutes from ''...
>substitute: updating substitutes from ''...
>construido satisfactoriamente
>la construcción de
>Muestra el registro de construcción en
>-guix upgrade: error: build of
>(sorry about the language)
>it's saying that
>the log doesn't output anything usefull, it just shows that the file
>So I try to build it from the derivation for more info:
>guix build
>Se construirá la siguiente derivación:
>   /gnu/store/3dfjsc9nm0bjcv4p0gidgi61n3yk3ps3-enchant-2.2.5.tar.gz.drv
>sha256 hash mismatch for output path
>  expected: 0iqwzs11i9fvqdxv5kn0svcn2mzymn657qf3j66lg8dx1nh4xkpz
>  actual:   0r41qjz3104h5raiwlw5ywwybafbxdjz12j1bnq3kq60jlr6d2pf
>And there it goes, the sha256 it's wrong, either in the .scm definition
>or upstream.
>I choose to trust upstream and try to define a package with the same
>name and version but different sha256.
>guix download --no-check-certificate
>to get the hash (**) and file
>and defining enchant.scm with:
>(use-modules (guix packages)
>             (guix download)
>             (gnu packages enchant)
>             (gnu packages wm))
> (inherit enchant)
> (name "enchant")
> (version "2.2.5")
> (source (origin
>          (method url-fetch)
>      (uri (string-append "";
>                              "/download/v" version "/enchant-"
>                              version ".tar.gz"))
>          (sha256
>           (base32
>            "0r41qjz3104h5raiwlw5ywwybafbxdjz12j1bnq3kq60jlr6d2pf")))))
>and then
>guix package -f enchant.scm
>I succefully install enchant, with the same version and name.
>Then happily enjoying my wit to circumvent this issue until more proper
>fixing takes place, I try to do a package upgrade again 'guix package
>but as a knowingly reader might predict, it just tries to build again
>the enchant definition on guix repos. No matter that the package have
>the same version and name, the package has another hash, another place
>on the store, it's just a different input for the packages that use
>enchant. So my hacky solution it's a no-solution that poped up in my
>mind because habits from a non functional world die hard... but they
>will... eventually.
>So the questions are:
>* How do I patch a package definition when I find a bug?
>* Do I have to use guixsd or guix from source? (I'm currently using a
>  guix binary installation on a foreign distro)
>* I know that I can define a package with modifications. Say, modify
>  emacs to display mario bros on background.. cuz... that would be
>  really usefull.  But how to modify a package definition that it's not
> a leaf in the dependency graph? I never installed enchant, it's just a
>  dependency. Say I find a bug or want to mess around with some lib and
> break things for fun. Just to break it, travel back in time with guix,
>  and break it again in just another way. Do I have to redefine all the
>  packages that use that dependency or there is an automatic way to do
>  it?
>(*) I was suffering from the same problem in this thread
>   and tried Ludovic suggestion. Maybe I remove more links that Ludovic
>    suggests, but after some manual tinkering it just works.
>(**) How does guix download calculates the hash? if I do a
>     $sha256sum tarball.tar.gz it outputs other hash.
>Thanks in advance!

Sorry I'm too tired to answer properly. Their is a section about contributing 
in the manual. Have you read that?

As a workaround, you can try guix package -u --with-source=enchant=`guix 
download …` where … is the url of the sources you want to use. Iirc, it applies 
to dependencies recursively.

Good night, and good luck :)

reply via email to

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