Skip to content
Snippets Groups Projects
Commit 9be82389 authored by Krzysztof Gogolewski's avatar Krzysztof Gogolewski Committed by Marge Bot
Browse files

boot: Remove remote origin check

Previously, we used relative paths in submodules. When cloning from
GitHub, they had to be manually tweaked.
Since a76b233d we use absolute paths, so this workaround can be removed.
parent 59c023ba
No related branches found
No related tags found
No related merge requests found
......@@ -28,43 +28,8 @@ def die(mesg):
print_err(mesg)
sys.exit(1)
def check_for_url_rewrites():
if os.path.isdir('.git') and \
subprocess.check_output('git config remote.origin.url'.split()).find(b'github.com') != -1 and \
subprocess.call(['git', 'config', '--get-regexp', '^url.*github.com/.*/packages-.insteadOf']) != 0:
# If we cloned from github, make sure the url rewrites are set.
# Otherwise 'git submodule update --init' prints confusing errors.
die("""\
It seems you cloned this repository from GitHub. But your git config files
don't contain the url rewrites that are needed to make this work (GitHub
doesn't support '/' in repository names, so we use a different naming scheme
for the submodule repositories there).
Please run the following commands first:
git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
git config --global url."http://github.com/ghc/packages-".insteadOf http://github.com/ghc/packages/
git config --global url."https://github.com/ghc/packages-".insteadOf https://github.com/ghc/packages/
git config --global url."ssh://git\@github.com/ghc/packages-".insteadOf ssh://git\@github.com/ghc/packages/
git config --global url."git\@github.com:/ghc/packages-".insteadOf git\@github.com:/ghc/packages/
And then:
git submodule update --init
./boot
Or start over, and clone the GHC repository from the haskell server:
git clone --recursive git@gitlab.haskell.org:ghc/ghc.git
For more information, see:
* https://gitlab.haskell.org/ghc/ghc/wikis/newcomers or
* https://gitlab.haskell.org/ghc/ghc/wikis/building/getting-the-sources#cloning-from-github
""")
def check_boot_packages():
# Check that we have all boot packages.
import re
for l in open('packages', 'r'):
if l.startswith('#'):
continue
......@@ -200,7 +165,6 @@ def check_build_mk():
https://gitlab.haskell.org/ghc/ghc/wikis/building/using#build-configuration
"""))
check_for_url_rewrites()
check_boot_packages()
if not args.hadrian:
boot_pkgs()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment