summaryrefslogtreecommitdiff
path: root/indra/lib/python
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2013-07-26 10:42:13 -0400
committerNat Goodspeed <nat@lindenlab.com>2013-07-26 10:42:13 -0400
commita207b24d331539e16bd66ca09df3c585529c99f0 (patch)
tree89a6eb69ce3a26b9e534c24bf65fe398970729b2 /indra/lib/python
parent10c8fbbedbee07355f71ef206c50957a422d7ccf (diff)
CHOP-955: Include app_settings/settings_install.xml in file_list.
viewer_manifest.py uses its base-class llmanifest.LLManifest.put_in_file() method to create several different files in the install image being marshalled. I based the logic to create settings_install.xml on that example. Unfortunately I failed to notice that after every existing call, the script also explicitly appended the newly-created file to self.file_list... which only matters on Windows. file_list is fed to the NSIS installer. Change put_in_file() method to implicitly append to self.file_list. Change every existing viewer_manifest.py call to pass new put_in_file(src=) param instead of explicitly appending to self.file_list.
Diffstat (limited to 'indra/lib/python')
-rwxr-xr-xindra/lib/python/indra/util/llmanifest.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py
index 9cb830a2db..54049b5545 100755
--- a/indra/lib/python/indra/util/llmanifest.py
+++ b/indra/lib/python/indra/util/llmanifest.py
@@ -392,11 +392,21 @@ class LLManifest(object):
raise ManifestError, "Should be something at path " + path
self.created_paths.append(path)
- def put_in_file(self, contents, dst):
+ def put_in_file(self, contents, dst, src=None):
# write contents as dst
- f = open(self.dst_path_of(dst), "wb")
- f.write(contents)
- f.close()
+ dst_path = self.dst_path_of(dst)
+ f = open(dst_path, "wb")
+ try:
+ f.write(contents)
+ finally:
+ f.close()
+
+ # Why would we create a file in the destination tree if not to include
+ # it in the installer? The default src=None (plus the fact that the
+ # src param is last) is to preserve backwards compatibility.
+ if src:
+ self.file_list.append([src, dst_path])
+ return dst_path
def replace_in(self, src, dst=None, searchdict={}):
if dst == None: