diff options
author | Petr Rockai <me@mornfall.net> | 2014-02-28 23:56:04 +0100 |
---|---|---|
committer | Petr Rockai <me@mornfall.net> | 2014-02-28 23:56:04 +0100 |
commit | 301ac8a07cb1c043cea61eb58ea2bae42a2cbcc2 (patch) | |
tree | 2ad6fe3966dac916433b8f288eafe05f985f0c18 | |
parent | daa897fe90d59c823af6c4b29c5b75fec5ad0be9 (diff) | |
download | lvm2-301ac8a07cb1c043cea61eb58ea2bae42a2cbcc2.tar.gz |
NIX: Cope with existence of multiple primary.xml files.
This can happen temporarily while a mirror is syncing (parsing repomd.xml
would be a better fix, but slightly tricky since it's xml).
-rw-r--r-- | nix/default.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nix/default.nix b/nix/default.nix index 75c727763..140ae7fe7 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -75,11 +75,11 @@ let unifiedSystemDir = true; }; rawhide = version: arch: repodata: import (pkgs.runCommand "rawhide-${version}-${arch}.nix" {} '' - sha=$(grep primary.xml ${repodata} | sed -re 's:.* ([0-9a-f]+)-primary.*:\1:') + sha=$(grep primary.xml ${repodata} | sed -re 's:.* ([0-9a-f]+)-primary.*:\1:' | head -n 1) echo '{fedora}: fedora { version = "${version}"; sha = "'$sha'"; arch = "${arch}"; }' > $out '') { inherit fedora; }; update = version: arch: repodata: orig: orig // (import (pkgs.runCommand "updates-fedora.nix" {} '' - sha=$(grep primary.xml ${repodata} | sed -re 's:.* ([0-9a-f]+)-primary.*:\1:') + sha=$(grep primary.xml ${repodata} | sed -re 's:.* ([0-9a-f]+)-primary.*:\1:' | head -n 1) echo fedora ${version} updates sha: $sha (echo 'fetchurl: orig: { packagesLists = [ orig.packagesList (' echo "fetchurl { " |