From 89867c5fd88e887e961ceb3519c73d1b3b69daf3 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 22 Jan 2015 14:20:05 -0300 Subject: 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. --- bundler/actions.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bundler') 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") -- cgit v1.2.3