diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2012-10-10 17:18:26 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2012-10-10 17:18:26 -0400 |
commit | fdddd37db095dbbefb17b1725db5fb9527ba3fd9 (patch) | |
tree | 45693136e51429757cc5491603e04fabae5af109 /indra/newview/viewer_manifest.py | |
parent | 3653727e7f84f10caefb6ea7dc33859455ebfa0b (diff) |
Remove HelpUseLocal setting variable. Hide local html skin dir.
We assert that the local html directory is no longer used. Remove machinery
related to its use, notably HelpUseLocal, the code that checks it and the
code that sets and examines special flag URL "__local".
Before actually killing off the local skins/default/html directory, make
viewer_manifest.py rename it but continue packaging it as html.old. If this
doesn't cause a panic, we can proceed with removing it entirely.
Diffstat (limited to 'indra/newview/viewer_manifest.py')
-rw-r--r-- | indra/newview/viewer_manifest.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index e754c26733..4f1b58dfcb 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -28,7 +28,10 @@ $/LicenseInfo$ """ import sys import os.path +import errno +import glob import re +import shutil import tarfile import time import random @@ -136,6 +139,30 @@ class ViewerManifest(LLManifest): self.path("*/*/*.html") self.path("*/*/*.gif") self.end_prefix("*/html") + + # The claim is that we never use local html files any + # longer. But rather than commenting out the "*/html" + # block above, let's rename every html subdirectory we + # copied as html.old. That way, if we're wrong, a user + # actually does have the relevant files; s/he just needs + # to rename every html.old directory back to html to + # recover them. (Possibly I could accomplish the rename + # with clever use of self.prefix(), but the leading "*" + # perplexes me.) + for htmldir in glob.glob(os.path.join(self.get_dst_prefix(), "*", "html")): + htmlold = htmldir + ".old" + print "Renaming %r => %r" % (htmldir, os.path.basename(htmlold)) + try: + os.rename(htmldir, htmlold) + except OSError, err: + if err.errno != errno.ENOTEMPTY: + raise + # If we already have a directory by that name and + # it's not empty, remove it and retry. + shutil.rmtree(htmlold) + # If it still blows up, let the exception propagate. + os.rename(htmldir, htmlold) + self.end_prefix("skins") # local_assets dir (for pre-cached textures) |