mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
* nix-push / generate-patches: bzip the manifest.
This commit is contained in:
parent
7b20c0ed4b
commit
9441550acb
5 changed files with 17 additions and 2 deletions
|
@ -264,8 +264,12 @@ foreach my $narArchive (@narArchives) {
|
||||||
print STDERR "uploading manifest...\n";
|
print STDERR "uploading manifest...\n";
|
||||||
if ($localCopy) {
|
if ($localCopy) {
|
||||||
copyFile $manifest, $localManifestFile;
|
copyFile $manifest, $localManifestFile;
|
||||||
|
copyFile "$manifest.bz2", "$localManifestFile.bz2";
|
||||||
} else {
|
} else {
|
||||||
system("$curl --show-error --upload-file " .
|
system("$curl --show-error --upload-file " .
|
||||||
"'$manifest' '$manifestPutURL' > /dev/null") == 0 or
|
"'$manifest' '$manifestPutURL' > /dev/null") == 0 or
|
||||||
die "curl failed on $manifest: $?";
|
die "curl failed on $manifest: $?";
|
||||||
|
system("$curl --show-error --upload-file " .
|
||||||
|
"'$manifest'.bz2 '$manifestPutURL'.bz2 > /dev/null") == 0 or
|
||||||
|
die "curl failed on $manifest: $?";
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,6 +222,14 @@ sub writeManifest
|
||||||
|
|
||||||
rename("$manifest.tmp", $manifest)
|
rename("$manifest.tmp", $manifest)
|
||||||
or die "cannot rename $manifest.tmp: $!";
|
or die "cannot rename $manifest.tmp: $!";
|
||||||
|
|
||||||
|
|
||||||
|
# Create a bzipped manifest.
|
||||||
|
system("@bzip2@ < $manifest > $manifest.bz2.tmp") == 0
|
||||||
|
or die "cannot compress manifest";
|
||||||
|
|
||||||
|
rename("$manifest.bz2.tmp", "$manifest.bz2")
|
||||||
|
or die "cannot rename $manifest.bz2.tmp: $!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ ln -s $TOP/scripts/nix-prefetch-url $NIX_BIN_DIR/
|
||||||
ln -s $TOP/scripts/nix-collect-garbage $NIX_BIN_DIR/
|
ln -s $TOP/scripts/nix-collect-garbage $NIX_BIN_DIR/
|
||||||
ln -s $TOP/scripts/nix-build $NIX_BIN_DIR/
|
ln -s $TOP/scripts/nix-build $NIX_BIN_DIR/
|
||||||
ln -s $TOP/scripts/nix-install-package $NIX_BIN_DIR/
|
ln -s $TOP/scripts/nix-install-package $NIX_BIN_DIR/
|
||||||
|
ln -s $TOP/scripts/nix-push $NIX_BIN_DIR/
|
||||||
ln -s $TOP/scripts/nix-pull $NIX_BIN_DIR/
|
ln -s $TOP/scripts/nix-pull $NIX_BIN_DIR/
|
||||||
ln -s $bzip2_bin_test/bzip2 $NIX_BIN_DIR/
|
ln -s $bzip2_bin_test/bzip2 $NIX_BIN_DIR/
|
||||||
ln -s $bzip2_bin_test/bunzip2 $NIX_BIN_DIR/
|
ln -s $bzip2_bin_test/bunzip2 $NIX_BIN_DIR/
|
||||||
|
@ -57,7 +58,9 @@ for i in \
|
||||||
$NIX_BIN_DIR/nix-collect-garbage \
|
$NIX_BIN_DIR/nix-collect-garbage \
|
||||||
$NIX_BIN_DIR/nix-build \
|
$NIX_BIN_DIR/nix-build \
|
||||||
$NIX_BIN_DIR/nix-install-package \
|
$NIX_BIN_DIR/nix-install-package \
|
||||||
|
$NIX_BIN_DIR/nix-push \
|
||||||
$NIX_BIN_DIR/nix-pull \
|
$NIX_BIN_DIR/nix-pull \
|
||||||
|
$NIX_BIN_DIR/nix/readmanifest.pm \
|
||||||
; do
|
; do
|
||||||
sed < $i > $i.tmp \
|
sed < $i > $i.tmp \
|
||||||
-e "s^$REAL_BIN_DIR^$NIX_BIN_DIR^" \
|
-e "s^$REAL_BIN_DIR^$NIX_BIN_DIR^" \
|
||||||
|
|
|
@ -2,7 +2,7 @@ source common.sh
|
||||||
|
|
||||||
pullCache () {
|
pullCache () {
|
||||||
echo "pulling cache..."
|
echo "pulling cache..."
|
||||||
$PERL -w -I$TOP/scripts $TOP/scripts/nix-pull file://$TEST_ROOT/manifest
|
$NIX_BIN_DIR/nix-pull file://$TEST_ROOT/manifest
|
||||||
}
|
}
|
||||||
|
|
||||||
clearStore
|
clearStore
|
||||||
|
|
|
@ -7,5 +7,5 @@ echo "pushing $drvPath"
|
||||||
|
|
||||||
mkdir $TEST_ROOT/cache
|
mkdir $TEST_ROOT/cache
|
||||||
|
|
||||||
$PERL -w -I$TOP/scripts $TOP/scripts/nix-push \
|
$NIX_BIN_DIR/nix-push \
|
||||||
--copy $TEST_ROOT/cache $TEST_ROOT/manifest $drvPath
|
--copy $TEST_ROOT/cache $TEST_ROOT/manifest $drvPath
|
||||||
|
|
Loading…
Reference in a new issue