Closed twhitehead closed 8 years ago
What version of Nixpks / channel do you use?
For what it's worth, this error does not occur on current master
:
$ nix-build ~/.nix-defexpr -A rPackages.maps
/nix/store/78ywbc5blf23sl1i5zyx1hddqarmdsxv-r-maps-3.0.0-2
Currently using a slight modified (nothing to do with fetchurl or R though) version of tag 15.09 from September 30th.
Maybe it is relevant that I'm running it with the 1.10 release of Nix from September 3rd. I seem to recall there was something about switching some of the fetch stuff to being builtin recently?
I see 287f99badae394c38a200170a60189d74d1f52f9 from 15 days ago dropped the cran mirrors and replaced them all with the single mran.revolutionanalytics.com/snapshot/${snapshot} mirror. I guess this would explain why it is working in master but not for me on 15.09.
Out of curiosity what do you get with nix-prefetchurl on the cran.stat.unipd.it mirror
$ nix-prefetch-url http://cran.stat.unipd.it/src/contrib/maps_2.3-11.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 837 100 837 0 0 3847 0 --:--:-- --:--:-- --:--:-- 3875 path is ‘/home/nixbld/store/c0jzzh7icc6dl64l1wd72rw15ayb3m6z-maps_2.3-11.tar.gz’ 102rw6gw1mrbr00s8b1bnz2yh2nqk411qdhs6kncs6scalixjb5p
versus the master cran.r-project.org mirror
nix-prefetch-url http://cran.r-project.org/src/contrib/maps_2.3-11.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (22) The requested URL returned error: 404 Not Found /home/nixbld/var/nix/profiles/default/bin/nix-prefetch-url: download of ‘http://cran.r-project.org/src/contrib/maps_2.3-11.tar.gz’ failed
This could be fixed in Nixpkgs' fetchurl, by checking the hash before considering the download to be successful: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/fetchurl/builder.sh#L36
Or there could be more work on Nix's builtin fetchurl implementation.
The build succeeds in the release-15.09
branch, too:
$ nix-build ~/.nix-defexpr -A rPackages.maps
/nix/store/6dn61i6ifdwnfsh7qz17qn177d54x4j6-r-maps-3.0.0-2
That command used revision 1a86bf8aae151c40747f4e47e791356ff0084e2b. I suppose this issue will go away after a channel update.
That does seem odd. Presuming you've found that
curl http://cran.stat.unipd.it/src/contrib/maps_2.3-11.tar.gz
gives you a webpage instead of a 401 error? I really don't understand then. From what I can tell of the code it should do the following in order and stop on the first success
1- try every $url in the mirror list in the order of the mirror list with _$url/src/contrib/maps2.3-11.tar.gz 2- try every $url in the mirror list in the order of the mirror list with _$url/src/contrib/00Archive/maps/maps2.3-11.tar.gz
and this shouldn't work as when it tries _http://cran.stat.unipd.it/src/contrib/maps_2.3-11.tar.gz_ it will think it succeeded because it gets the webpage instead of a 401. The build when the fail as the webpage won't match the hash.
What did you log say for the fetch? Mine looked like so
trying http://cran.r-project.org/src/contrib/maps_2.3-11.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (22) The requested URL returned error: 404 Not Found ... trying http://cran.stat.unipd.it/src/contrib/maps_2.3-11.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 837 100 837 0 0 3772 0 --:--:-- --:--:-- --:--:-- 3839
Cheers! -Tyson
@twhitehead, please update your channel, i.e. run nix-channel --update
. You are using an obsolete version of the R package set.
I'm getting the following while building the
rPackages.maps
packageLooking at the mirror in a website reveals that there is no _maps2.3-11.tar.gz under just contrib and manually downloading the path with curl gives you back a basic html page (which I can't seem to include here as a quote as markdown doesn't escape all the html for me).
I believe what is suppose to happen is it should realize the download failed and next try the contrib/00Archive/maps directory. I'm guessing something is wrong with this mirror in that it isn't returning an appropriate error?
Thanks! -Tyson