summaryrefslogtreecommitdiff
path: root/bundler
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2015-01-22 14:20:05 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2015-01-22 14:20:05 -0300
commit89867c5fd88e887e961ceb3519c73d1b3b69daf3 (patch)
tree8d5fbb5c0d95bd3b5ed8787aab5c754cda5fa55c /bundler
parentdfec8e1f51ad41a00b5c8fdb0a6a5102badad75a (diff)
Add the option to build the bundle with no TUF.
Specifying in the spec file an option for 'tuf_repo' different than 'stable' or 'unstable' will build a TUF-less bundle.
Diffstat (limited to 'bundler')
-rw-r--r--bundler/actions.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/bundler/actions.py b/bundler/actions.py
index cee1508..b36e280 100644
--- a/bundler/actions.py
+++ b/bundler/actions.py
@@ -568,15 +568,21 @@ class CopyMisc(Action):
tuf_config = self.TUF_CONFIG.format(self.TUF_STABLE)
elif tuf_repo == 'unstable':
tuf_config = self.TUF_CONFIG.format(self.TUF_UNSTABLE)
+ else:
+ # a different value than stable/unstable is interpreted as
+ # "don't use tuf", so we don't use a launcher file
+ tuf_config = None
- with open(launcher_path, "w") as f:
- f.write(tuf_config)
+ if tuf_config is not None:
+ with open(launcher_path, "w") as f:
+ f.write(tuf_config)
metadata = os.path.join(self._basedir, "Bitmask", "repo", "metadata")
mkdir("-p", os.path.join(metadata, "current"))
mkdir("-p", os.path.join(metadata, "previous"))
cp(os.path.join(binary_path, "root.json"),
os.path.join(metadata, "current"))
+
self.log("done")