summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-08-15 15:16:57 +0000
committerIan Lynagh <igloo@earth.li>2010-08-15 15:16:57 +0000
commit0e17d4498cc037d5c18d33fcc4a4885778d266c0 (patch)
treee08cb9ec6812792138afa6aa3fdead92a1d87692 /boot
parenteb586af1a1eaa107138dd38eaadacf842b9b0b4d (diff)
downloadhaskell-0e17d4498cc037d5c18d33fcc4a4885778d266c0.tar.gz
Make the "tag" column of the packages file always present
It makes the parsing simpler if we always have the same number of columns
Diffstat (limited to 'boot')
-rw-r--r--boot26
1 files changed, 14 insertions, 12 deletions
diff --git a/boot b/boot
index 339f21dca2..6683ad5698 100644
--- a/boot
+++ b/boot
@@ -8,6 +8,7 @@ use Cwd;
system("/usr/bin/perl", "-w", "boot-pkgs") == 0
or die "Running boot-pkgs failed: $?";
+my $tag;
my $dir;
my $curdir;
@@ -20,21 +21,22 @@ while (<PACKAGES>) {
if (/^#/) {
# Comment; do nothing
}
- elsif (/^([a-zA-Z0-9\/.-]+) *[^ ]+ *[^ ]+$/) {
+ elsif (/^([a-zA-Z0-9\/.-]+) *([^ ]+) *[^ ]+ *[^ ]+$/) {
$dir = $1;
+ $tag = $2;
- # We would like to just check for an _darcs directory here, but in
- # an lndir tree we avoid making _darcs directories, so it doesn't
- # exist. We therefore require that every repo has a LICENSE file
- # instead.
- if (! -f "$dir/LICENSE") {
- print STDERR "Error: $dir/LICENSE doesn't exist.\n";
- die "Maybe you haven't done './darcs-all get'?";
- }
- }
- elsif (/^([a-zA-Z0-9\/.-]+) *[^ ]+ *[^ ]+ *[^ ]+$/) {
- # These are lines which refer to optional repositories, so their
+ # If $tag is not "-" then it is an optional repository, so its
# absence isn't an error.
+ if ($tag eq "-") {
+ # We would like to just check for an _darcs directory here,
+ # but in an lndir tree we avoid making _darcs directories,
+ # so it doesn't exist. We therefore require that every repo
+ # has a LICENSE file instead.
+ if (! -f "$dir/LICENSE") {
+ print STDERR "Error: $dir/LICENSE doesn't exist.\n";
+ die "Maybe you haven't done './darcs-all get'?";
+ }
+ }
}
else {
die "Bad line in packages file: $_";