summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-09 21:00:49 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-09 21:12:09 +1000
commitd661759780d70c771c3748095db5a5308451266d (patch)
tree8b45e33594a73b3501f35fbb289b0ff0685ee007
parenta591b8497d53aaa45c316c722e58d94f77420955 (diff)
downloadsamba-d661759780d70c771c3748095db5a5308451266d.tar.gz
samba-d661759780d70c771c3748095db5a5308451266d.tar.bz2
samba-d661759780d70c771c3748095db5a5308451266d.zip
build: nicer error message on missing file in waf dist
-rw-r--r--buildtools/wafsamba/samba_dist.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/buildtools/wafsamba/samba_dist.py b/buildtools/wafsamba/samba_dist.py
index b4a6cbb240..0fa8dbee03 100644
--- a/buildtools/wafsamba/samba_dist.py
+++ b/buildtools/wafsamba/samba_dist.py
@@ -1,14 +1,18 @@
# customised version of 'waf dist' for Samba tools
# uses git ls-files to get file lists
-import Utils, os, sys, tarfile, stat, Scripting
+import Utils, os, sys, tarfile, stat, Scripting, Logs
from samba_utils import *
dist_dirs = None
def add_tarfile(tar, fname, abspath):
'''add a file to the tarball'''
- tinfo = tar.gettarinfo(name=abspath, arcname=fname)
+ try:
+ tinfo = tar.gettarinfo(name=abspath, arcname=fname)
+ except OSError:
+ Logs.error('Unable to find file %s - missing from git checkout?' % abspath)
+ sys.exit(1)
tinfo.uid = 0
tinfo.gid = 0
tinfo.uname = 'root'