Skip to content

Commit

Permalink
configure: Require one of wget or curl.
Browse files Browse the repository at this point in the history
  • Loading branch information
luqmana committed Jun 30, 2013
1 parent c6b0d4f commit 9c3ef89
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ fi
step_msg "looking for build programs"

probe_need CFG_PERL perl
probe_need CFG_CURL curl
probe_need CFG_CURLORWGET curl wget
probe_need CFG_PYTHON python2.7 python2.6 python2 python

python_version=$($CFG_PYTHON -V 2>&1)
Expand Down
10 changes: 8 additions & 2 deletions src/etc/snapshot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# xfail-license

import re, os, sys, glob, tarfile, shutil, subprocess, tempfile
import re, os, sys, glob, tarfile, shutil, subprocess, tempfile, distutils.spawn

try:
import hashlib
Expand Down Expand Up @@ -132,7 +132,13 @@ def local_rev_committer_date():
def get_url_to_file(u,f):
# no security issue, just to stop partial download leaving a stale file
tmpf = f + '.tmp'
returncode = subprocess.call(["curl", "-o", tmpf, u])

returncode = -1
if distutils.spawn.find_executable("curl"):
returncode = subprocess.call(["curl", "-o", tmpf, u])
elif distutils.spawn.find_executable("wget"):
returncode = subprocess.call(["wget", "-O", tmpf, u])

if returncode != 0:
os.unlink(tmpf)
raise
Expand Down

9 comments on commit 9c3ef89

@bors
Copy link
Contributor

@bors bors commented on 9c3ef89 Jul 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from catamorphism
at luqmana@9c3ef89

@bors
Copy link
Contributor

@bors bors commented on 9c3ef89 Jul 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging luqmana/rust/cow = 9c3ef89 into auto

@bors
Copy link
Contributor

@bors bors commented on 9c3ef89 Jul 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

luqmana/rust/cow = 9c3ef89 merged ok, testing candidate = 4902f0a3

@bors
Copy link
Contributor

@bors bors commented on 9c3ef89 Jul 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from catamorphism
at luqmana@9c3ef89

@bors
Copy link
Contributor

@bors bors commented on 9c3ef89 Jul 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging luqmana/rust/cow = 9c3ef89 into auto

@bors
Copy link
Contributor

@bors bors commented on 9c3ef89 Jul 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

luqmana/rust/cow = 9c3ef89 merged ok, testing candidate = fc02d69

@bors
Copy link
Contributor

@bors bors commented on 9c3ef89 Jul 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = fc02d69

Please sign in to comment.