- fetchbzr and nix-prefetch-bzr now only export, instead of cloning

- The option for cloning in nix-prefetch-bzr is removed
- ssl certificates are now ignored by fetchbzr

This means that no .bzr directory is downloaded.  Without this change, the
hash of the result is unpredictable, probably because of timestamping in the
.bzr directory.

Currently, the only package using fetchbzr is kicad.
This commit is contained in:
Michael Ashton 2013-03-31 19:00:50 -07:00
parent 98ba667094
commit 8c63762d64
2 changed files with 2 additions and 7 deletions

View file

@ -4,6 +4,6 @@ header "exporting \`$url' (revision $revision) into \`$out'"
# Perform a lightweight checkout so that we don't end up importing
# all the repository's history.
bzr checkout --lightweight "$url" -r "$revision" "$out"
bzr -Ossl.cert_reqs=none export -r "$revision" --format=dir "$out" "$url"
stopNest

View file

@ -50,12 +50,7 @@ if test -z "$finalPath"; then
trap "rm -rf $tmpPath" EXIT
# Perform the checkout.
if test "$NIX_PREFETCH_BZR_LEAVE_DOT_BZR" != 1
then
bzr export $revarg "$tmpFile" "$url" >&2
else
bzr checkout --lightweight $revarg "$url" "$tmpFile" >&2
fi
bzr -Ossl.cert_reqs=none export $revarg --format=dir "$tmpFile" "$url"
# Compute the hash.
hash=$(nix-hash --type $hashType $hashFormat $tmpFile)