From b275f2ed3b2ae8fc22912122a5a4cdd5ef0fe0cd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 14 Apr 2004 08:09:27 +0000 Subject: * `*.gcroot' files can now containing multiple roots. --- scripts/nix-collect-garbage.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts/nix-collect-garbage.in') diff --git a/scripts/nix-collect-garbage.in b/scripts/nix-collect-garbage.in index 20c6731a14b5..fc67f1d55d1b 100755 --- a/scripts/nix-collect-garbage.in +++ b/scripts/nix-collect-garbage.in @@ -26,10 +26,14 @@ foreach my $link (@links) { $link = $linkdir . "/" . $link; next if (!($link =~ /.gcroot$/)); open ROOT, "<$link" or die "cannot open $link: $!"; - my $root = ; - chomp $root; + while () { + chomp; + foreach my $root (split ' ') { + die "bad root `$root' in file `$link'" unless $root =~ /^\S+$/; + push @roots, $root; + } + } close ROOT; - push @roots, $root; } my $extraarg = ""; -- cgit 1.4.1