diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-05-28 18:50:25 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-05-28 21:59:07 +1000 |
commit | b50c006e203e313a836eb012548749948b515425 (patch) | |
tree | 77e34c11da8b895fd01bf485ca07c38de4adcc2e /buildtools/wafsamba | |
parent | e5232bdc69af45f15bc8fd95745276018f5961be (diff) | |
download | samba-b50c006e203e313a836eb012548749948b515425.tar.gz samba-b50c006e203e313a836eb012548749948b515425.tar.bz2 samba-b50c006e203e313a836eb012548749948b515425.zip |
waf Add DIST_BLACKLIST to list files that we cannot include in a release
This currently includes the source3 directory for Samba4 releases (per
past practice in mkrelease.sh), but also could include things like
DFSG-unfree RFC files in the future.
Andrew Barltett
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r-- | buildtools/wafsamba/samba_dist.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_dist.py b/buildtools/wafsamba/samba_dist.py index 0586550814..30e82620af 100644 --- a/buildtools/wafsamba/samba_dist.py +++ b/buildtools/wafsamba/samba_dist.py @@ -5,6 +5,7 @@ import Utils, os, sys, tarfile, stat, Scripting, Logs from samba_utils import * dist_dirs = None +dist_blacklist = None def add_symlink(tar, fname, abspath, basedir): '''handle symlinks to directories that may move during packaging''' @@ -88,6 +89,7 @@ def dist(appname='',version=''): dist_name = '%s.tar.gz' % (dist_base) tar = tarfile.open(dist_name, 'w:gz') + blacklist = dist_blacklist.split() for dir in dist_dirs.split(): if dir.find(':') != -1: @@ -106,6 +108,17 @@ def dist(appname='',version=''): abspath = os.path.join(srcdir, f) if dir != '.': f = f[len(dir)+1:] + + # Remove files in the blacklist + if f in dist_blacklist: + continue + blacklisted = False + # Remove directories in the blacklist + for d in blacklist: + if f.startswith(d): + blacklisted = True + if blacklisted: + continue if destdir != '.': f = destdir + '/' + f fname = dist_base + '/' + f @@ -124,4 +137,11 @@ def DIST_DIRS(dirs): if not dist_dirs: dist_dirs = dirs +@conf +def DIST_BLACKLIST(blacklist): + '''set the directories to package, relative to top srcdir''' + global dist_blacklist + if not dist_blacklist: + dist_blacklist = blacklist + Scripting.dist = dist |