[lvm-devel] master - NIX: Cope with existence of multiple primary.xml files.

Petr Rockai mornfall at fedoraproject.org
Fri Feb 28 22:58:08 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=301ac8a07cb1c043cea61eb58ea2bae42a2cbcc2
Commit:        301ac8a07cb1c043cea61eb58ea2bae42a2cbcc2
Parent:        daa897fe90d59c823af6c4b29c5b75fec5ad0be9
Author:        Petr Rockai <me at mornfall.net>
AuthorDate:    Fri Feb 28 23:56:04 2014 +0100
Committer:     Petr Rockai <me at mornfall.net>
CommitterDate: Fri Feb 28 23:56:04 2014 +0100

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).
---
 nix/default.nix |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/nix/default.nix b/nix/default.nix
index 75c7277..140ae7f 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 { "




More information about the lvm-devel mailing list