diff options
author | Vlastimil Holer <vlastimil.holer@gmail.com> | 2013-02-20 17:13:38 +0100 |
---|---|---|
committer | Vlastimil Holer <vlastimil.holer@gmail.com> | 2013-02-20 17:13:38 +0100 |
commit | 48abaf6a72dca4485f0bc64af075febac6ef590d (patch) | |
tree | 5769b239d9d30c435e7f73dc8486dfbb4ec7c387 /packages/bddeb | |
parent | 174bc39e6b2c1cac3f73f67f25fad87cab16fa42 (diff) | |
download | vyos-cloud-init-48abaf6a72dca4485f0bc64af075febac6ef590d.tar.gz vyos-cloud-init-48abaf6a72dca4485f0bc64af075febac6ef590d.zip |
Added arguments to packages/bddeb:
-d pass through '-d' to debuild
--no-cloud-utils don't depend on cloud-utils package (default: False)
These are essential for building on Debian 6, because there are
no python-mocker (build dependency) and cloud-utils (install dependency)
in squeeze and squeeze-backports.
Diffstat (limited to 'packages/bddeb')
-rwxr-xr-x | packages/bddeb | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/packages/bddeb b/packages/bddeb index bda3170d..61399739 100755 --- a/packages/bddeb +++ b/packages/bddeb @@ -36,10 +36,10 @@ PKG_MP = { 'prettytable': 'python-prettytable', 'pyyaml': 'python-yaml', } -DEBUILD_ARGS = ["-us", "-S", "-uc"] +DEBUILD_ARGS = ["-us", "-S", "-uc", "-d"] -def write_debian_folder(root, version, revno): +def write_debian_folder(root, version, revno, append_requires=[]): deb_dir = util.abs_join(root, 'debian') os.makedirs(deb_dir) @@ -58,7 +58,7 @@ def write_debian_folder(root, version, revno): pkgs = [p.lower().strip() for p in stdout.splitlines()] # Map to known packages - requires = [] + requires = append_requires for p in pkgs: tgt_pkg = PKG_MP.get(p) if not tgt_pkg: @@ -87,6 +87,11 @@ def main(): " (default: %(default)s)"), default=False, action='store_true') + parser.add_argument("--no-cloud-utils", dest="no_cloud_utils", + help=("don't depend on cloud-utils package" + " (default: %(default)s)"), + default=False, + action='store_true') for ent in DEBUILD_ARGS: parser.add_argument(ent, dest="debuild_args", action='append_const', @@ -128,7 +133,11 @@ def main(): shutil.move(extracted_name, xdir) print("Creating a debian/ folder in %r" % (xdir)) - write_debian_folder(xdir, version, revno) + if not args.no_cloud_utils: + append_requires=['cloud-utils'] + else: + append_requires=[] + write_debian_folder(xdir, version, revno, append_requires) # The naming here seems to follow some debian standard # so it will whine if it is changed... |