* bug#32245: Guix does not search sources locally by hash
@ 2018-07-22 9:56 Björn Höfling
2018-07-23 8:41 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: Björn Höfling @ 2018-07-22 9:56 UTC (permalink / raw)
To: 32245
[-- Attachment #1: Type: text/plain, Size: 2385 bytes --]
[Note: This concrete package is nonfree/Yoghurt-ware, but it's just
used here for showing the general problem, so I think it is OK to post
it here].
I renamed a package definition from "eclipse-java" to "java-eclipse".
Now upstream seams no longer be availabe:
$> ./pre-inst-env guix build java-eclipse
[..]
@ build-started /gnu/store/lqfw971srfifgql68ibdgh58vi4d8fq3-java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz.drv - x86_64-linux /var/log/guix/drvs/lq//fw971srfifgql68ibdgh58vi4d8fq3-java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz.drv.bz2
guile: warning: failed to install locale
warning: failed to install locale: Invalid argument
Starting download of /gnu/store/dcjzplbvc27amcdgd9kffmyhskdw80d7-java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz
From https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/3a/java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz...
ERROR: download failed "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/3a/java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz" 404 "Not Found"
Starting download of /gnu/store/dcjzplbvc27amcdgd9kffmyhskdw80d7-java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz
From http://mirror.hydra.gnu.org/file/java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz/sha256/0m7y7jfm059w01x9j5b5qkinjjmhkyygpjabhjf19fg2smxmwcim...
ERROR: download failed "http://mirror.hydra.gnu.org/file/java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz/sha256/0m7y7jfm059w01x9j5b5qkinjjmhkyygpjabhjf19fg2smxmwcim" 404 "Not Found"
Starting download of /gnu/store/dcjzplbvc27amcdgd9kffmyhskdw80d7-java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz
From http://tarballs.nixos.org/sha256/0m7y7jfm059w01x9j5b5qkinjjmhkyygpjabhjf19fg2smxmwcim...
ERROR: download failed "http://tarballs.nixos.org/sha256/0m7y7jfm059w01x9j5b5qkinjjmhkyygpjabhjf19fg2smxmwcim" 404 "Not Found"
[...]
So, what you see here is that Guix is looking for the sources JUST by
hash on remote sites (Hydra, Nix).
But it does NOT search locally. Because I already have:
guix hash /gnu/store/56h6snwcawpzk6rhcwgk442wsx6k86q2-eclipse-java-oxygen-3a-linux-gtk-x86_64.tar.gz
0m7y7jfm059w01x9j5b5qkinjjmhkyygpjabhjf19fg2smxmwcim
If Guix searches remotely by hash, I would find it obvious that Guix
searches beforehand locally by hash. But it does not.
Björn
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#32245: Guix does not search sources locally by hash
2018-07-22 9:56 bug#32245: Guix does not search sources locally by hash Björn Höfling
@ 2018-07-23 8:41 ` Ludovic Courtès
2018-07-23 9:50 ` Björn Höfling
2018-10-22 7:00 ` Björn Höfling
0 siblings, 2 replies; 6+ messages in thread
From: Ludovic Courtès @ 2018-07-23 8:41 UTC (permalink / raw)
To: Björn Höfling; +Cc: 32245
Hi,
Björn Höfling <bjoern.hoefling@bjoernhoefling.de> skribis:
> $> ./pre-inst-env guix build java-eclipse
> [..]
> @ build-started /gnu/store/lqfw971srfifgql68ibdgh58vi4d8fq3-java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz.drv - x86_64-linux /var/log/guix/drvs/lq//fw971srfifgql68ibdgh58vi4d8fq3-java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz.drv.bz2
[...]
> But it does NOT search locally. Because I already have:
>
> guix hash /gnu/store/56h6snwcawpzk6rhcwgk442wsx6k86q2-eclipse-java-oxygen-3a-linux-gtk-x86_64.tar.gz
> 0m7y7jfm059w01x9j5b5qkinjjmhkyygpjabhjf19fg2smxmwcim
It does, but the file name matters. In this case what you have is
“eclipse-java-…” but you’re trying to build “java-eclipse-…”.
So you first need to add the file to the store under its expected name.
You can do that for instance with:
guix download file://…/java-eclipse-…
HTH!
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#32245: Guix does not search sources locally by hash
2018-07-23 8:41 ` Ludovic Courtès
@ 2018-07-23 9:50 ` Björn Höfling
2018-07-23 14:50 ` Ludovic Courtès
2018-10-22 7:00 ` Björn Höfling
1 sibling, 1 reply; 6+ messages in thread
From: Björn Höfling @ 2018-07-23 9:50 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 32245
[-- Attachment #1: Type: text/plain, Size: 1508 bytes --]
On Mon, 23 Jul 2018 10:41:14 +0200
ludo@gnu.org (Ludovic Courtès) wrote:
> Hi,
>
> Björn Höfling <bjoern.hoefling@bjoernhoefling.de> skribis:
>
> > $> ./pre-inst-env guix build java-eclipse
> > [..]
> > @
> > build-started /gnu/store/lqfw971srfifgql68ibdgh58vi4d8fq3-java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz.drv
> > -
> > x86_64-linux /var/log/guix/drvs/lq//fw971srfifgql68ibdgh58vi4d8fq3-java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz.drv.bz2
>
> [...]
>
> > But it does NOT search locally. Because I already have:
> >
> > guix
> > hash /gnu/store/56h6snwcawpzk6rhcwgk442wsx6k86q2-eclipse-java-oxygen-3a-linux-gtk-x86_64.tar.gz
> > 0m7y7jfm059w01x9j5b5qkinjjmhkyygpjabhjf19fg2smxmwcim
>
> It does, but the file name matters. In this case what you have is
> “eclipse-java-…” but you’re trying to build “java-eclipse-…”.
>
> So you first need to add the file to the store under its expected
> name. You can do that for instance with:
>
> guix download file://…/java-eclipse-…
>
> HTH!
Not sure yet. I havent't tried it yet, but I'm sure your solution
helps with the specific problem here. (Also updating the URL helps even
better :-))
What I feel strange here is:
* When the file is already on the local disk, it has to match a certain
file name criteria. Quite hard criteria.
* But when asking outside repositories over the network, we just "take
anything that has the hashsum".
Is that wanted behaviour?
Björn
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#32245: Guix does not search sources locally by hash
2018-07-23 9:50 ` Björn Höfling
@ 2018-07-23 14:50 ` Ludovic Courtès
0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2018-07-23 14:50 UTC (permalink / raw)
To: Björn Höfling; +Cc: 32245
Björn Höfling <bjoern.hoefling@bjoernhoefling.de> skribis:
> On Mon, 23 Jul 2018 10:41:14 +0200
> ludo@gnu.org (Ludovic Courtès) wrote:
>
>> Hi,
>>
>> Björn Höfling <bjoern.hoefling@bjoernhoefling.de> skribis:
>>
>> > $> ./pre-inst-env guix build java-eclipse
>> > [..]
>> > @
>> > build-started /gnu/store/lqfw971srfifgql68ibdgh58vi4d8fq3-java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz.drv
>> > -
>> > x86_64-linux /var/log/guix/drvs/lq//fw971srfifgql68ibdgh58vi4d8fq3-java-eclipse-oxygen-3a-linux-gtk-x86_64.tar.gz.drv.bz2
>>
>> [...]
>>
>> > But it does NOT search locally. Because I already have:
>> >
>> > guix
>> > hash /gnu/store/56h6snwcawpzk6rhcwgk442wsx6k86q2-eclipse-java-oxygen-3a-linux-gtk-x86_64.tar.gz
>> > 0m7y7jfm059w01x9j5b5qkinjjmhkyygpjabhjf19fg2smxmwcim
>>
>> It does, but the file name matters. In this case what you have is
>> “eclipse-java-…” but you’re trying to build “java-eclipse-…”.
>>
>> So you first need to add the file to the store under its expected
>> name. You can do that for instance with:
>>
>> guix download file://…/java-eclipse-…
>>
>> HTH!
>
> Not sure yet. I havent't tried it yet, but I'm sure your solution
> helps with the specific problem here. (Also updating the URL helps even
> better :-))
>
> What I feel strange here is:
>
> * When the file is already on the local disk, it has to match a certain
> file name criteria. Quite hard criteria.
> * But when asking outside repositories over the network, we just "take
> anything that has the hashsum".
>
> Is that wanted behaviour?
It’s not optimal, as you pointed out. But it’s not implemented in these
terms. The ‘add-to-store’ RPC returns a file name that’s a function of
the content and the file name. So the way ‘add-to-store’ works is:
1. compute store file name = g(content, filename)
(See ‘fixed-output-path’ in (guix store).)
2. if store file name exists, return it, else create it.
Since /var/guix/db/db.sqlite contains the content hash of each store
item, we could in theory perform a lookup by hash. To do that we’d need
to add a new RPC and use it in the correct places. It’d be a nice
addition.
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#32245: Guix does not search sources locally by hash
2018-07-23 8:41 ` Ludovic Courtès
2018-07-23 9:50 ` Björn Höfling
@ 2018-10-22 7:00 ` Björn Höfling
2018-10-22 8:06 ` Gábor Boskovits
1 sibling, 1 reply; 6+ messages in thread
From: Björn Höfling @ 2018-10-22 7:00 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 32245-done
[-- Attachment #1: Type: text/plain, Size: 69 bytes --]
I'm closing this one as I think it has very low priority.
Björn
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#32245: Guix does not search sources locally by hash
2018-10-22 7:00 ` Björn Höfling
@ 2018-10-22 8:06 ` Gábor Boskovits
0 siblings, 0 replies; 6+ messages in thread
From: Gábor Boskovits @ 2018-10-22 8:06 UTC (permalink / raw)
To: 32245, Björn Höfling; +Cc: 32245-done
Hello Björn,
It might be better to just lower the priority, or make it wishlist.
Björn Höfling <bjoern.hoefling@bjoernhoefling.de> ezt írta (időpont:
2018. okt. 22., H, 9:01):
>
> I'm closing this one as I think it has very low priority.
>
> Björn
g_bor
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-10-22 8:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-22 9:56 bug#32245: Guix does not search sources locally by hash Björn Höfling
2018-07-23 8:41 ` Ludovic Courtès
2018-07-23 9:50 ` Björn Höfling
2018-07-23 14:50 ` Ludovic Courtès
2018-10-22 7:00 ` Björn Höfling
2018-10-22 8:06 ` Gábor Boskovits
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.