summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-11-12 17:00:42 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-11-12 17:42:13 +0000
commite3b7ce85e2db8cf09202fc2da843cf043e64e81c (patch)
treef989c5fedb55ee4b01b6458e46a6bd1228c2e389
parent5a482a641e9631e269684d4394864659791b5dec (diff)
downloadsamba-e3b7ce85e2db8cf09202fc2da843cf043e64e81c.tar.gz
samba-e3b7ce85e2db8cf09202fc2da843cf043e64e81c.tar.bz2
samba-e3b7ce85e2db8cf09202fc2da843cf043e64e81c.zip
wafsamba: Support make dist from bzr checkout.
-rw-r--r--buildtools/wafsamba/samba_dist.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/buildtools/wafsamba/samba_dist.py b/buildtools/wafsamba/samba_dist.py
index 7cd4d54b01..b62f256ee4 100644
--- a/buildtools/wafsamba/samba_dist.py
+++ b/buildtools/wafsamba/samba_dist.py
@@ -103,11 +103,17 @@ def dist(appname='',version=''):
else:
destdir = '.'
absdir = os.path.join(srcdir, dir)
- git_cmd = [ 'git', 'ls-files', '--full-name', absdir ]
+ if os.path.isdir(os.path.join(absdir, ".git")):
+ ls_files_cmd = [ 'git', 'ls-files', '--full-name', absdir ]
+ elif os.path.isdir(os.path.join(absdir, ".bzr")):
+ ls_files_cmd = [ 'bzr', 'ls', '--from-root', '--recursive', '-d', absdir ]
+ else:
+ Logs.error('unknown or no vcs for %s' % absdir)
+ sys.exit(1)
try:
- files = Utils.cmd_output(git_cmd).split()
+ files = Utils.cmd_output(ls_files_cmd).split()
except:
- Logs.error('git command failed: %s' % ' '.join(git_cmd))
+ Logs.error('command failed: %s' % ' '.join(ls_files_cmd))
sys.exit(1)
for f in files:
abspath = os.path.join(srcdir, f)
@@ -124,6 +130,8 @@ def dist(appname='',version=''):
blacklisted = True
if blacklisted:
continue
+ if os.path.isdir(abspath):
+ continue
if destdir != '.':
f = destdir + '/' + f
fname = dist_base + '/' + f