[Nix-dev] I broke the buildfarm again - how to fix for the future?
Marc Weber
marco-oweber at gmx.de
Sat Apr 26 00:55:41 CEST 2008
context:
buildfarm log:
getting attributes of path `/tmp/nix-build-vzjf88ha7knkyrcgd5p76ip20sjjnz4w-source-tarball.drv-0/wbcwpmccxjawv2a9fvj1giavxqnvfmmg-svn-export/pkgs/misc/bleeding-edge-fetch-info/pg_hsql.nix': No such file or directory
@niksnut (SVN log)
* Comment out ghc68extraLibs (it breaks the Nixpkgs release due to
missing files and I don't understand the code...)
The reason why I broke the buildfarm is that there was no .nix file in
misc/bleeding-edge-fetch-info/<name>.nix
I've tried rewriting the code of bleeding-edge-repos this way:
description:
a ) local tar.gz - not found ? then
b ) source .nix file containing
fetchurl { url=<path to my server offering latest .tar.gz versions> .. }
removed c ) use fetch(svn/darcs/...) removed (doesn't make sense because of hash)
code:
sourceByName = name : (
let localTarGZ = managedRepoDir+"/dist/${name}.tar.gz";
fetchUrlInfoFile = ../../../misc/bleeding-edge-fetch-info + "/${name}.nix"; in
if pathExists localTarGZ
then localTarGZ
else if pathExists fetchUrlInfoFile
then (import fetchUrlInfoFile) { inherit fetchurl; }
# if this happens (I) Marc Weber (marco-oweber at gmx.de)
# have propably forgotten to commit the .nix file containing the fetchurl derivation
# contact me to fix it and /or install nixRepositoryManager and get a
# local copy by nix-repository-manager --update name
# using throw to never make the builfarm fail because of this again
else throw "no bleeding edge source info (${fetchUrlInfoFile}) found for ${name}");
trouble:
I need ../../../misc to get an absolute path (because the function can be called anywhere..)
however ../../../misc + name.nix fails if it doesn't exist, so my
throw (which should make the buildfarm skip this expression) is not
reached
>>> So can the checking of path existance be made lazy ?
I think this kind of error might happen to me again.
So using throw seems to be the best solution to me.
Eelco: I'd be glad to introduce you to my code. This part can be
understood in about 2min I think. Just ping me if you're interested.
Sorry for all the inconvinience
Marc Weber
More information about the nix-dev
mailing list