summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Holer <vlastimil.holer@gmail.com>2013-02-20 17:13:38 +0100
committerVlastimil Holer <vlastimil.holer@gmail.com>2013-02-20 17:13:38 +0100
commit48abaf6a72dca4485f0bc64af075febac6ef590d (patch)
tree5769b239d9d30c435e7f73dc8486dfbb4ec7c387
parent174bc39e6b2c1cac3f73f67f25fad87cab16fa42 (diff)
downloadvyos-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.
-rwxr-xr-xpackages/bddeb17
-rw-r--r--packages/debian/control.in3
2 files changed, 14 insertions, 6 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...
diff --git a/packages/debian/control.in b/packages/debian/control.in
index edb5aff5..b9352f5b 100644
--- a/packages/debian/control.in
+++ b/packages/debian/control.in
@@ -18,8 +18,7 @@ Standards-Version: 3.9.3
Package: cloud-init
Architecture: all
-Depends: cloud-utils,
- procps,
+Depends: procps,
python,
#for $r in $requires
${r},