Remove the VCS column from 'packages'
authorIan Lynagh <ian@well-typed.com>
Mon, 4 Mar 2013 18:22:19 +0000 (18:22 +0000)
committerIan Lynagh <ian@well-typed.com>
Mon, 4 Mar 2013 19:16:04 +0000 (19:16 +0000)
It's now always 'git'.

boot
packages
sync-all

diff --git a/boot b/boot
index 1374742..3c17e4c 100755 (executable)
--- a/boot
+++ b/boot
@@ -58,7 +58,7 @@ sub sanity_check_tree {
         if (/^#/) {
             # Comment; do nothing
         }
-        elsif (/^([a-zA-Z0-9\/.-]+) +([^ ]+) +[^ ]+ +[^ ]+$/) {
+        elsif (/^([a-zA-Z0-9\/.-]+) +([^ ]+) +[^ ]+$/) {
             $dir = $1;
             $tag = $2;
 
index 9fc8a32..7f8a8ab 100644 (file)
--- a/packages
+++ b/packages
@@ -1,4 +1,4 @@
-# Despite the name "package", this file contains the master list of 
+# Despite the name "package", this file contains the master list of
 # the *repositories* that make up GHC. It is parsed by
 # * boot
 # * sync-all
 #    - The main GHC source repo
 #    - Each boot package lives in a repo
 #    - DPH is a repo that contains several packages
-#    - Haddock and hsc2hs are applications, built on top of GHC, 
+#    - Haddock and hsc2hs are applications, built on top of GHC,
 #        and in turn needed to bootstrap GHC
 #    - ghc-tarballs is need to build GHC
 #    - nofib and testsuite are optional helpers
 #
 # The format of the lines in this file is:
-#   localpath    tag    remotepath    VCS
+#   localpath    tag    remotepath
 # where
 #   * 'localpath' is where to put the repository in a checked out tree.
 #   * 'remotepath' is where the repository is in the central repository.
 #     It is - for submodules.
-#   * 'VCS' is what version control system the repo uses.
 #
 #   * The 'tag' determines when "darcs-all get" will get the
 #     repo. If the tag is "-" then it will always get it, but if there
 #     if you want to get the packages with an "extralibs" or "testsuite"
 #     tag then you need to use "darcs-all --extra --testsuite get".
 #     Support for new tags must be manually added to the darcs-all script.
-# 
+#
 #     'tag' is also used to determine which packages the build system
-#     deems to have the EXTRA_PACKAGE property: tags 'dph' and 'extra' 
+#     deems to have the EXTRA_PACKAGE property: tags 'dph' and 'extra'
 #     both give this property
 #
 # Lines that start with a '#' are comments.
 #
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#    localpath                tag           remotepath                          VCS
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-ghc-tarballs                    -           ghc-tarballs.git                    git
-utils/hsc2hs                    -           hsc2hs.git                          git
-utils/haddock                   -           haddock.git                         git
-libraries/array                 -           packages/array.git                  git
-libraries/base                  -           packages/base.git                   git
-libraries/binary                -           -                                   git
-libraries/bytestring            -           -                                   git
-libraries/Cabal                 -           -                                   git
-libraries/containers            -           -                                   git
-libraries/deepseq               -           packages/deepseq.git                git
-libraries/directory             -           packages/directory.git              git
-libraries/filepath              -           packages/filepath.git               git
-libraries/ghc-prim              -           packages/ghc-prim.git               git
-libraries/haskeline             -           -                                   git
-libraries/haskell98             -           packages/haskell98.git              git
-libraries/haskell2010           -           packages/haskell2010.git            git
-libraries/hoopl                 -           packages/hoopl.git                  git
-libraries/hpc                   -           packages/hpc.git                    git
-libraries/integer-gmp           -           packages/integer-gmp.git            git
-libraries/integer-simple        -           packages/integer-simple.git         git
-libraries/old-locale            -           packages/old-locale.git             git
-libraries/old-time              -           packages/old-time.git               git
-libraries/pretty                -           -                                   git
-libraries/process               -           packages/process.git                git
-libraries/template-haskell      -           packages/template-haskell.git       git
-libraries/terminfo              -           -                                   git
-libraries/time                  -           -                                   git
-libraries/transformers          -           -                                   git
-libraries/unix                  -           packages/unix.git                   git
-libraries/Win32                 -           -                                   git
-libraries/xhtml                 -           -                                   git
-testsuite                       testsuite   testsuite.git                       git
-nofib                           nofib       nofib.git                           git
-libraries/parallel              extra       packages/parallel.git               git
-libraries/stm                   extra       packages/stm.git                    git
-libraries/random                dph         -                                   git
-libraries/primitive             dph         -                                   git
-libraries/vector                dph         -                                   git
-libraries/dph                   dph         packages/dph.git                    git
-.                               -           ghc.git                             git
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#    localpath                tag           remotepath
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ghc-tarballs                    -           ghc-tarballs.git
+utils/hsc2hs                    -           hsc2hs.git
+utils/haddock                   -           haddock.git
+libraries/array                 -           packages/array.git
+libraries/base                  -           packages/base.git
+libraries/binary                -           -
+libraries/bytestring            -           -
+libraries/Cabal                 -           -
+libraries/containers            -           -
+libraries/deepseq               -           packages/deepseq.git
+libraries/directory             -           packages/directory.git
+libraries/filepath              -           packages/filepath.git
+libraries/ghc-prim              -           packages/ghc-prim.git
+libraries/haskeline             -           -
+libraries/haskell98             -           packages/haskell98.git
+libraries/haskell2010           -           packages/haskell2010.git
+libraries/hoopl                 -           packages/hoopl.git
+libraries/hpc                   -           packages/hpc.git
+libraries/integer-gmp           -           packages/integer-gmp.git
+libraries/integer-simple        -           packages/integer-simple.git
+libraries/old-locale            -           packages/old-locale.git
+libraries/old-time              -           packages/old-time.git
+libraries/pretty                -           -
+libraries/process               -           packages/process.git
+libraries/template-haskell      -           packages/template-haskell.git
+libraries/terminfo              -           -
+libraries/time                  -           -
+libraries/transformers          -           -
+libraries/unix                  -           packages/unix.git
+libraries/Win32                 -           -
+libraries/xhtml                 -           -
+testsuite                       testsuite   testsuite.git
+nofib                           nofib       nofib.git
+libraries/parallel              extra       packages/parallel.git
+libraries/stm                   extra       packages/stm.git
+libraries/random                dph         -
+libraries/primitive             dph         -
+libraries/vector                dph         -
+libraries/dph                   dph         packages/dph.git
+.                               -           ghc.git
index ac2e5c0..71d707e 100755 (executable)
--- a/sync-all
+++ b/sync-all
@@ -105,12 +105,11 @@ sub parsePackages {
     foreach (@repos) {
         chomp;
         $lineNum++;
-        if (/^([^# ]+) +([^ ]+) +([^ ]+) +([^ ]+)$/) {
+        if (/^([^# ]+) +([^ ]+) +([^ ]+)$/) {
             my %line;
             $line{"localpath"}  = $1;
             $line{"tag"}        = $2;
             $line{"remotepath"} = $3;
-            $line{"vcs"}        = $4;
             push @packages, \%line;
         }
         elsif (! /^(#.*)?$/) {
@@ -164,9 +163,8 @@ sub gitNewWorkdir {
 
 sub configure_repository {
     my $localpath = shift;
-    my $scm = shift;
 
-    &scm($localpath, $scm, "config", "--local", "core.ignorecase", "true");
+    &git($localpath, "config", "--local", "core.ignorecase", "true");
 
     chdir($localpath);
     open my $git_autocrlf, '-|', 'git', 'config', '--get', 'core.autocrlf'
@@ -177,39 +175,36 @@ sub configure_repository {
     close($git_autocrlf);
     chdir($initial_working_directory);
     if ($autocrlf eq "true") {
-        &scm($localpath, $scm,
-             "config", "--local", "core.autocrlf", "false");
-        &scm($localpath, $scm, "reset", "--hard");
+        &git($localpath, "config", "--local", "core.autocrlf", "false");
+        &git($localpath, "reset", "--hard");
     }
 }
 
-sub scm {
+sub git {
     my $dir = shift;
-    my $scm = shift;
 
     if ($dir eq '.') {
-        message "== running $scm @_";
+        message "== running git @_";
     } else {
-        message "== $dir: running $scm @_";
+        message "== $dir: running git @_";
         chdir($dir);
     }
 
-    system ($scm, @_) == 0
+    system ("git", @_) == 0
         or $ignore_failure
-        or die "$scm failed: $?";
+        or die "git failed: $?";
 
     if ($dir ne '.') {
         chdir($initial_working_directory);
     }
 }
 
-sub scmall {
+sub gitall {
     my $command = shift;
 
     my $localpath;
     my $tag;
     my $remotepath;
-    my $scm;
     my $line;
     my $branch_name;
     my $subcommand;
@@ -282,7 +277,6 @@ sub scmall {
 
     for $line (@packages) {
         $tag        = $$line{"tag"};
-        $scm        = $$line{"vcs"};
         # Use the "remote" structure for bare git repositories
         $localpath  = ($bare_flag) ?
                       $$line{"remotepath"} : $$line{"localpath"};
@@ -304,9 +298,6 @@ sub scmall {
         close RESUME;
         rename "resume.tmp", "resume";
 
-        # Check the SCM is OK as early as possible
-        die "Unknown SCM: $scm" if ($scm ne "git");
-
         # We can't create directories on GitHub, so we translate
         # "packages/foo" into "package-foo".
         if ($is_github_repo) {
@@ -330,7 +321,7 @@ sub scmall {
             if (-d $localpath) {
                 warning("$localpath already present; omitting")
                     if $localpath ne ".";
-                &configure_repository($localpath, $scm);
+                &configure_repository($localpath);
                 next;
             }
 
@@ -338,29 +329,30 @@ sub scmall {
             # doesn't exist yet.
             my @argsWithBare = @args;
             push @argsWithBare, $bare_flag if $bare_flag;
-            scm (".", $scm, "clone", $path, $localpath, @argsWithBare);
-            &configure_repository($localpath, $scm);
+            &git(".", "clone", $path, $localpath, @argsWithBare);
+            &configure_repository($localpath);
             next;
         }
 
         my $git_repo_present = 1 if -e "$localpath/.git" || ($bare_flag && -d "$localpath");
-        if ($git_repo_present) {
-            $scm = "git";
-        } elsif ($tag eq "") {
-            die "Required repo $localpath is missing";
-        } else {
-             message "== $localpath repo not present; skipping";
-             next;
+        if (not $git_repo_present) {
+            if ($tag eq "") {
+                die "Required repo $localpath is missing";
+            }
+            else {
+                 message "== $localpath repo not present; skipping";
+                 next;
+            }
         }
 
         # Work out the arguments we should give to the SCM
         if ($command eq "status") {
-            scm ($localpath, $scm, $command, @args);
+            &git($localpath, $command, @args);
         }
         elsif ($command eq "commit") {
             # git fails if there is nothing to commit, so ignore failures
             $ignore_failure = 1;
-            scm ($localpath, $scm, "commit", @args);
+            &git($localpath, "commit", @args);
         }
         elsif ($command eq "check_submodules") {
             # If we have a submodule then check whether it is up-to-date
@@ -404,7 +396,7 @@ sub scmall {
             # described on
             # http://hackage.haskell.org/trac/ghc/wiki/Repositories/Upstream
             if ($remotepath ne "-") {
-                scm ($localpath, $scm, "push", @args);
+                &git($localpath, "push", @args);
             }
         }
         elsif ($command eq "pull") {
@@ -421,24 +413,24 @@ sub scmall {
                 $realcmd = "pull";
                 @realargs = @args;
             }
-            scm ($localpath, $scm, $realcmd, @realargs);
+            &git($localpath, $realcmd, @realargs);
         }
         elsif ($command eq "new-workdir") {
             gitNewWorkdir ($localpath, @args);
         }
         elsif ($command eq "send") {
             $command = "send-email";
-            scm ($localpath, $scm, $command, @args);
+            &git($localpath, $command, @args);
         }
         elsif ($command eq "fetch") {
-            scm ($localpath, $scm, "fetch", @args);
+            &git($localpath, "fetch", @args);
         }
         elsif ($command eq "new") {
             my @scm_args = ("log", "$branch_name..");
-            scm ($localpath, $scm, @scm_args, @args);
+            &git($localpath, @scm_args, @args);
         }
         elsif ($command eq "log") {
-            scm ($localpath, $scm, "log", @args);
+            &git($localpath, "log", @args);
         }
         elsif ($command eq "remote") {
             my @scm_args;
@@ -458,44 +450,44 @@ sub scmall {
             } elsif ($subcommand eq 'set-url') {
                 @scm_args = ("remote", "set-url", $branch_name, $rpath);
             }
-            scm ($localpath, $scm, @scm_args, @args);
+            &git($localpath, @scm_args, @args);
         }
         elsif ($command eq "checkout") {
             # Not all repos are necessarily branched, so ignore failure
             $ignore_failure = 1;
-            scm ($localpath, $scm, "checkout", @args);
+            &git($localpath, "checkout", @args);
         }
         elsif ($command eq "grep") {
             # Hack around 'git grep' failing if there are no matches
             $ignore_failure = 1;
-            scm ($localpath, $scm, "grep", @args);
+            &git($localpath, "grep", @args);
         }
         elsif ($command eq "diff") {
-            scm ($localpath, $scm, "diff", @args);
+            &git($localpath, "diff", @args);
         }
         elsif ($command eq "clean") {
-            scm ($localpath, $scm, "clean", @args);
+            &git($localpath, "clean", @args);
         }
         elsif ($command eq "reset") {
-            scm ($localpath, $scm, "reset", @args);
+            &git($localpath, "reset", @args);
         }
         elsif ($command eq "branch") {
-            scm ($localpath, $scm, "branch", @args);
+            &git($localpath, "branch", @args);
         }
         elsif ($command eq "config") {
-            scm ($localpath, $scm, "config", @args);
+            &git($localpath, "config", @args);
         }
         elsif ($command eq "repack") {
-            scm ($localpath, $scm, "repack", @args);
+            &git($localpath, "repack", @args);
         }
         elsif ($command eq "format-patch") {
-            scm ($localpath, $scm, "format-patch", @args);
+            &git($localpath, "format-patch", @args);
         }
         elsif ($command eq "gc") {
-            scm ($localpath, $scm, "gc", @args);
+            &git($localpath, "gc", @args);
         }
         elsif ($command eq "tag") {
-            scm ($localpath, $scm, "tag", @args);
+            &git($localpath, "tag", @args);
         }
         else {
             die "Unknown command: $command";
@@ -793,28 +785,28 @@ sub main {
         }
 
         if ($command eq "push") {
-            scmall ("check_submodules", @_);
+            &gitall("check_submodules", @_);
         }
 
-        scmall ($command, @_);
+        &gitall($command, @_);
 
         my @submodule_args = grep(/^-q/,@_);
 
         if ($command eq "get") {
-            &scm(".", "git", "submodule", "init", @submodule_args);
+            &git(".", "submodule", "init", @submodule_args);
         }
         if ($command eq "pull") {
             my $gitConfig = &tryReadFile(".git/config");
             if ($gitConfig !~ /submodule/) {
-                &scm(".", "git", "submodule", "init", @submodule_args);
+                &git(".", "submodule", "init", @submodule_args);
             }
         }
         if ($command eq "get" or $command eq "pull") {
             my $gitConfig = &tryReadFile(".git/config");
             if ($gitConfig !~ /submodule/) {
-                &scm(".", "git", "submodule", "init", @submodule_args);
+                &git(".", "submodule", "init", @submodule_args);
             }
-            &scm(".", "git", "submodule", "update", @submodule_args);
+            &git(".", "submodule", "update", @submodule_args);
         }
     }
 }