[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
56/118: Remove cruft
From: |
Ludovic Courtès |
Subject: |
56/118: Remove cruft |
Date: |
Tue, 19 May 2015 14:45:38 +0000 |
civodul pushed a commit to branch nix
in repository guix.
commit 5bcb98271103c6c2ca3b993d8b1b0eb9eadcbc1c
Author: Eelco Dolstra <address@hidden>
Date: Mon Jul 14 12:39:33 2014 +0200
Remove cruft
---
scripts/copying-collector.pl | 111 ------------------------------------------
scripts/remove-patches.pl | 16 ------
2 files changed, 0 insertions(+), 127 deletions(-)
diff --git a/scripts/copying-collector.pl b/scripts/copying-collector.pl
deleted file mode 100755
index 2e8be2d..0000000
--- a/scripts/copying-collector.pl
+++ /dev/null
@@ -1,111 +0,0 @@
-#! /usr/bin/perl -w
-
-use strict;
-
-my @paths = `nix-store -qR /home/eelco/.nix-profile/bin/firefox`;
-
-my %copyMap;
-my %rewriteMap;
-
-
-my $counter = 0;
-
-foreach my $path (@paths) {
- chomp $path;
-
- $path =~ /^(.*)\/([^-]+)-(.*)$/ or die "invalid store path `$path'";
- my $hash = $2;
-
-# my $newHash = "deadbeef" . (sprintf "%024d", $counter++);
- my $newHash = "deadbeef" . substr($hash, 0, 24);
- my $newPath = "/home/eelco/chroot/$1/$newHash-$3";
-
- die unless length $newHash == length $hash;
-
- $copyMap{$path} = $newPath;
- $rewriteMap{$hash} = $newHash;
-}
-
-
-my %rewriteMap2;
-
-
-sub rewrite;
-sub rewrite {
- my $src = shift;
- my $dst = shift;
-
- if (-l $dst) {
-
- my $target = readlink $dst or die;
-
- foreach my $srcHash (keys %rewriteMap2) {
- my $dstHash = $rewriteMap{$srcHash};
- print " $srcHash -> $dstHash\n";
- $target =~ s/$srcHash/$dstHash/g;
- }
-
- unlink $dst or die;
-
- symlink $target, $dst;
-
- }
-
- elsif (-f $dst) {
-
- print "$dst\n";
-
- foreach my $srcHash (keys %rewriteMap2) {
- my $dstHash = $rewriteMap{$srcHash};
- print " $srcHash -> $dstHash\n";
-
- my @stats = lstat $dst or die;
-
- system "sed s/$srcHash/$dstHash/g < '$dst' > '$dst.tmp'";
- die if $? != 0;
- rename "$dst.tmp", $dst or die;
-
- chmod $stats[2], $dst or die;
- }
-
- }
-
- elsif (-d $dst) {
-
- chmod 0755, $dst;
-
- opendir(DIR, "$dst") or die "cannot open `$dst': $!";
- my @files = readdir DIR;
- closedir DIR;
-
- foreach my $file (@files) {
- next if $file eq "." || $file eq "..";
- rewrite "$src/$file", "$dst/$file";
- }
- }
-}
-
-
-foreach my $src (keys %copyMap) {
- my $dst = $copyMap{$src};
- print "$src -> $dst\n";
-
- if (!-e $dst) {
- system "cp -prd $src $dst";
- die if $? != 0;
-
- my @refs = `nix-store -q --references $src`;
-
- %rewriteMap2 = ();
- foreach my $ref (@refs) {
- chomp $ref;
-
- $ref =~ /^(.*)\/([^-]+)-(.*)$/ or die "invalid store path `$ref'";
- my $hash = $2;
-
- $rewriteMap2{$hash} = $rewriteMap{$hash};
- }
-
- rewrite $src, $dst;
- }
-}
diff --git a/scripts/remove-patches.pl b/scripts/remove-patches.pl
deleted file mode 100755
index 401771a..0000000
--- a/scripts/remove-patches.pl
+++ /dev/null
@@ -1,16 +0,0 @@
-#! /usr/bin/perl -w -I/home/eelco/nix/scripts
-
-use strict;
-use readmanifest;
-
-for my $p (@ARGV) {
-
- my %narFiles;
- my %patches;
-
- readManifest $p, \%narFiles, \%patches;
-
- %patches = ();
-
- writeManifest $p, \%narFiles, \%patches;
-}
- 39/118: nix-copy-closure: Fix race condition, (continued)
- 39/118: nix-copy-closure: Fix race condition, Ludovic Courtès, 2015/05/19
- 49/118: Allow $NIX_BUILD_HOOK to be relative to Nix libexec directory, Ludovic Courtès, 2015/05/19
- 52/118: Fix test, Ludovic Courtès, 2015/05/19
- 42/118: Refactoring: Move all fork handling into a higher-order function, Ludovic Courtès, 2015/05/19
- 41/118: nix-copy-closure: Restore compression and the progress viewer, Ludovic Courtès, 2015/05/19
- 54/118: build-remote.pl: Don't keep a shell process around, Ludovic Courtès, 2015/05/19
- 57/118: Manual: Typo, Ludovic Courtès, 2015/05/19
- 53/118: build-remote.pl: Fix build log, Ludovic Courtès, 2015/05/19
- 66/118: nix-daemon: Show name of connecting user, Ludovic Courtès, 2015/05/19
- 58/118: Pass *_proxy vars to bootstrap fetchurl, Ludovic Courtès, 2015/05/19
- 56/118: Remove cruft,
Ludovic Courtès <=
- 48/118: Fix broken Pid constructor, Ludovic Courtès, 2015/05/19
- 51/118: build-remote.pl: Use ‘nix-store --serve’ on the remote side, Ludovic Courtès, 2015/05/19
- 62/118: Be more strict about file names in NARs, Ludovic Courtès, 2015/05/19
- 65/118: nix-daemon: Only print connection info if we have SO_PEERCRED, Ludovic Courtès, 2015/05/19
- 72/118: Remove dead code, Ludovic Courtès, 2015/05/19
- 55/118: build-remote.pl: Fix building multiple output derivations, Ludovic Courtès, 2015/05/19
- 59/118: Install systemd and Upstart stuff only on Linux, Ludovic Courtès, 2015/05/19
- 68/118: Ugly hack to fix building on old Darwin, Ludovic Courtès, 2015/05/19
- 64/118: nix-daemon: Fix compat with older clients, Ludovic Courtès, 2015/05/19
- 61/118: Handle case collisions on case-insensitive systems, Ludovic Courtès, 2015/05/19