Hi Björn, Björn Höfling <[email protected]> writes:
> On Thu, 28 Mar 2019 23:11:22 -0600 > Alberto EFG <[email protected]> wrote: > >> H, Mark and everyone who has been helpful >> >> > As other people have mentioned, this substitute should now be >> > available, >> I keep getting this, I don't know if I am doing something wrong: >> >> $ guix package -n -u . >> --substitute-urls="https://mirror.hydra.gnu.org >> https://ci.guix.info" [...] substitute: updating substitutes from >> 'https://mirror.hydra.gnu.org'... 100.0% substitute: updating >> substitutes from 'https://ci.guix.info'... 100.0% The following >> derivations would be >> built: /gnu/store/5xs5i2pkf369g2hd26f2sy26r40bzjm6-icecat-60.6.1-guix1.drv >> /gnu/store/4f40wrx514rbly302ha0gvpn5b53d91f-rust-1.24.1.drv >> /gnu/store/yf5fcqp3v4jf038g454h2zqm54x6ijj6-profile.drv >> 938.6 MB would be downloaded: > > I see that your hash of icecat differs from mine: > > $ guix package -n -i icecat > --substitute-urls="https://mirror.hydra.gnu.org https://ci.guix.info" > The following package would be upgraded: icecat 60.6.1-guix1 → > 60.6.1-guix1 /gnu/store/bwhnxvfx4ng5fhc7xi6wijp8qciqjpbk-icecat-60.6.1-guix1 The hashes don't match because one is a store derivation (.drv) file and the other is the output store item produced by that derivation. These store items are assigned different hashes. You might expect that the hash of a derivation could be reused for the outputs of that derivation, but it can't be done for a technical reason: the hash in the file name of a store derivation is based on the entire contents of that .drv file. That .drv file also contains its output file names. See the problem? In order to give these the same hash, you would need to create a derivation file that contains its own hash, i.e. the result of hashing its entire contents. That would involve solving an equation of the form: H = sha256(X ++ H ++ Y), which is presumably hard :) Regards, Mark
