forked from lix-project/lix
* Performance enhancement.
This commit is contained in:
parent
1d1c3691d2
commit
8511571f65
|
@ -6,6 +6,8 @@ my $tmpfile = "$prefix/var/nix/pull.tmp";
|
||||||
|
|
||||||
my $conffile = "$etcdir/prebuilts.conf";
|
my $conffile = "$etcdir/prebuilts.conf";
|
||||||
|
|
||||||
|
my @subs;
|
||||||
|
|
||||||
open CONFFILE, "<$conffile";
|
open CONFFILE, "<$conffile";
|
||||||
|
|
||||||
while (<CONFFILE>) {
|
while (<CONFFILE>) {
|
||||||
|
@ -55,8 +57,9 @@ while (<CONFFILE>) {
|
||||||
chomp $nhash;
|
chomp $nhash;
|
||||||
die unless $nhash =~ /^([0-9a-z]{32})$/;
|
die unless $nhash =~ /^([0-9a-z]{32})$/;
|
||||||
|
|
||||||
system "nix --substitute $hash $nhash";
|
push @subs, $hash;
|
||||||
if ($?) { die "`nix --substitute' failed"; }
|
push @subs, $nhash;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
close INDEX;
|
close INDEX;
|
||||||
|
@ -65,3 +68,6 @@ while (<CONFFILE>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
system "nix --substitute @subs";
|
||||||
|
if ($?) { die "`nix --substitute' failed"; }
|
||||||
|
|
Loading…
Reference in a new issue