[Libreoffice-commits] core.git: Branch 'feature/mar-updater' - 2 commits - bin/update
Markus Mohrhard
markus.mohrhard at googlemail.com
Fri Dec 30 19:27:09 UTC 2016
bin/update/config.py | 25 +++++++++++++++++++++++++
bin/update/create_full_mar.py | 6 +++++-
2 files changed, 30 insertions(+), 1 deletion(-)
New commits:
commit f07f605a8edfa332bdd4d0e750f45500702671d1
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Dec 30 20:25:12 2016 +0100
handle signing errors much better
Change-Id: I94be7b3626b9ac3389cba0bee640923adda0f118
diff --git a/bin/update/create_full_mar.py b/bin/update/create_full_mar.py
index e657e12..25e654c 100755
--- a/bin/update/create_full_mar.py
+++ b/bin/update/create_full_mar.py
@@ -47,7 +47,7 @@ def main():
subprocess.call([os.path.join(current_dir_path, 'make_full_update.sh'), mar_file, uncompress_dir])
signed_mar_file = make_mar_name(target_dir, filename_prefix + '_signed')
- subprocess.call([mar_executable, '-C', target_dir, '-d', config.certificate_path, '-n', config.certificate_name, '-s', mar_file, signed_mar_file])
+ subprocess.check_call([mar_executable, '-C', target_dir, '-d', config.certificate_path, '-n', config.certificate_name, '-s', mar_file, signed_mar_file])
os.rename(signed_mar_file, mar_file)
commit a168ff5043274c18f96a67e7aceafed7fa9c76ab
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Dec 30 20:24:49 2016 +0100
error out if the path to the updater config is empty
Change-Id: Ic199b15222836e096e32203d3458487fead6e3e1
diff --git a/bin/update/config.py b/bin/update/config.py
new file mode 100644
index 0000000..2af895b
--- /dev/null
+++ b/bin/update/config.py
@@ -0,0 +1,25 @@
+
+import configparser
+
+class Config(object):
+
+ def __init__(self):
+ self.certificate_path = None
+ self.certificate_name = None
+ self.channel = None
+ self.base_url = None
+ self.upload_url = None
+
+def parse_config(config_file):
+ config = configparser.ConfigParser()
+ config.read(config_file)
+
+ data = Config()
+ updater_data = config['Updater']
+ data.base_url = updater_data['base-url']
+ data.certificate_name = updater_data['certificate-name']
+ data.certificate_path = updater_data['certificate-path']
+ data.channel = updater_data['channel']
+ data.upload_url = updater_data['upload-url']
+
+ return data
diff --git a/bin/update/create_full_mar.py b/bin/update/create_full_mar.py
index 2362f2c..e657e12 100755
--- a/bin/update/create_full_mar.py
+++ b/bin/update/create_full_mar.py
@@ -27,6 +27,10 @@ def main():
workdir = sys.argv[2]
product_name = sys.argv[1]
+ if len(update_config) == 0:
+ print("missing update config")
+ sys.exit(1)
+
config = parse_config(update_config)
tar_dir = os.path.join(workdir, "installation", product_name, "archive", "install", "en-US")
More information about the Libreoffice-commits
mailing list