Merge. Refresh from viewer-release after 3.6.12 release.

Mon, 09 Dec 2013 15:29:21 -0500

author
Monty Brandenberg <monty@lindenlab.com>
date
Mon, 09 Dec 2013 15:29:21 -0500
changeset 40740
ba1f758296e6
parent 40739
805055e04c78
parent 40100
bc61d5ad9162
child 40741
67f869e108d0

Merge. Refresh from viewer-release after 3.6.12 release.

     1.1 --- a/.hgtags	Fri Dec 06 16:02:53 2013 -0500
     1.2 +++ b/.hgtags	Mon Dec 09 15:29:21 2013 -0500
     1.3 @@ -470,3 +470,4 @@
     1.4  70eda3721d36df3e00730629c42a1304e5bc65b8 3.6.9-release
     1.5  5b54b36862ff8bc3b6935673c9d1c1f22ee8d521 3.6.10-release
     1.6  2feb70a4cfde43f2898d95ff8fcae3e67805c7c2 3.6.11-release
     1.7 +88bbfd7a6971033f3aa103f3a3500ceb4c73521b 3.6.12-release
     2.1 --- a/BuildParams	Fri Dec 06 16:02:53 2013 -0500
     2.2 +++ b/BuildParams	Mon Dec 09 15:29:21 2013 -0500
     2.3 @@ -51,13 +51,13 @@
     2.4  sourceid = ""
     2.5  additional_packages = "Amazon Desura B C"
     2.6  Amazon_sourceid = "1207v_Amazon"
     2.7 -Amazon_viewer_channel_suffix = " Amazon"
     2.8 +Amazon_viewer_channel_suffix = "Amazon"
     2.9  Desura_sourceid = "1208_desura"
    2.10 -Desura_viewer_channel_suffix = " Desura"
    2.11 +Desura_viewer_channel_suffix = "Desura"
    2.12  B_sourceid = "1301_B"
    2.13 -B_viewer_channel_suffix = " B"
    2.14 +B_viewer_channel_suffix = "B"
    2.15  C_sourceid = "1302_C"
    2.16 -C_viewer_channel_suffix = " C"
    2.17 +C_viewer_channel_suffix = "C"
    2.18  
    2.19  # Report changes since...
    2.20  viewer-development.show_changes_since = last_sprint
     3.1 --- a/build.sh	Fri Dec 06 16:02:53 2013 -0500
     3.2 +++ b/build.sh	Mon Dec 09 15:29:21 2013 -0500
     3.3 @@ -347,8 +347,7 @@
     3.4    if $build_viewer
     3.5    then
     3.6      begin_section Upload Installer
     3.7 -    # Upload installer - note that ONLY THE FIRST ITEM uploaded as "installer"
     3.8 -    # will appear in the version manager.
     3.9 +    # Upload installer
    3.10      package=$(installer_$arch)
    3.11      if [ x"$package" = x ] || test -d "$package"
    3.12      then
    3.13 @@ -372,7 +371,7 @@
    3.14          then
    3.15            upload_item installer "$package" binary/octet-stream
    3.16          else
    3.17 -          record_failure "Failed to upload $package_id package."
    3.18 +          record_failure "Failed to upload $package_id package ($package::$additional_package_name)."
    3.19          fi
    3.20        done
    3.21        export additional_package_name=""
     4.1 --- a/indra/lib/python/indra/util/llmanifest.py	Fri Dec 06 16:02:53 2013 -0500
     4.2 +++ b/indra/lib/python/indra/util/llmanifest.py	Mon Dec 09 15:29:21 2013 -0500
     4.3 @@ -85,7 +85,8 @@
     4.4              }[sys.platform]
     4.5  
     4.6  DEFAULT_SRCTREE = os.path.dirname(sys.argv[0])
     4.7 -RELEASE_CHANNEL = 'Second Life Release'
     4.8 +CHANNEL_VENDOR_BASE = 'Second Life'
     4.9 +RELEASE_CHANNEL = CHANNEL_VENDOR_BASE + ' Release'
    4.10  
    4.11  ARGUMENTS=[
    4.12      dict(name='actions',
    4.13 @@ -112,13 +113,14 @@
    4.14           default="Release"),
    4.15      dict(name='dest', description='Destination directory.', default=DEFAULT_SRCTREE),
    4.16      dict(name='grid',
    4.17 -         description="""Which grid the client will try to connect to. Even
    4.18 -        though it's not strictly a grid, 'firstlook' is also an acceptable
    4.19 -        value for this parameter.""",
    4.20 -         default=""),
    4.21 +         description="""Which grid the client will try to connect to.""",
    4.22 +         default=None),
    4.23      dict(name='channel',
    4.24           description="""The channel to use for updates, packaging, settings name, etc.""",
    4.25           default='CHANNEL UNSET'),
    4.26 +    dict(name='channel_suffix',
    4.27 +         description="""Addition to the channel for packaging and channel value, but not application name (used internally)""",
    4.28 +         default=None),
    4.29      dict(name='installer_name',
    4.30           description=""" The name of the file that the installer should be
    4.31          packaged up into. Only used on Linux at the moment.""",
    4.32 @@ -213,9 +215,9 @@
    4.33              print "Unable to read versionfile '%s'" % args['versionfile']
    4.34              raise
    4.35  
    4.36 -    # default and agni are default
    4.37 -    if args['grid'] in ['default', 'agni']:
    4.38 -        args['grid'] = ''
    4.39 +    # unspecified, default, and agni are default
    4.40 +    if args['grid'] in ['', 'default', 'agni']:
    4.41 +        args['grid'] = None
    4.42  
    4.43      if 'actions' in args:
    4.44          args['actions'] = args['actions'].split()
    4.45 @@ -286,21 +288,24 @@
    4.46          base_channel_name = args['channel']
    4.47          # Build each additional package.
    4.48          package_id_list = additional_packages.split(" ")
    4.49 +        args['channel'] = base_channel_name
    4.50          for package_id in package_id_list:
    4.51              try:
    4.52 -                args['package_id'] = package_id
    4.53 -                args['channel'] = base_channel_name + os.environ[package_id + "_viewer_channel_suffix"]
    4.54 +                if package_id + "_viewer_channel_suffix" in os.environ:
    4.55 +                    args['channel_suffix'] = os.environ[package_id + "_viewer_channel_suffix"]
    4.56 +                else:
    4.57 +                    args['channel_suffix'] = None
    4.58                  if package_id + "_sourceid" in os.environ:
    4.59                      args['sourceid'] = os.environ[package_id + "_sourceid"]
    4.60                  else:
    4.61 -                    args['sourceid'] = ""
    4.62 +                    args['sourceid'] = None
    4.63                  args['dest'] = base_dest_prefix + os.sep + package_id + os.sep + base_dest_postfix
    4.64              except KeyError:
    4.65                  sys.stderr.write("Failed to create package for package_id: %s" % package_id)
    4.66                  sys.stderr.flush()
    4.67                  continue
    4.68              if touch:
    4.69 -                print 'Creating additional package for ', package_id, ' in ', args['dest']
    4.70 +                print 'Creating additional package for "', package_id, '" in ', args['dest']
    4.71              wm = LLManifest.for_platform(args['platform'], args.get('arch'))(args)
    4.72              wm.do(*args['actions'])
    4.73              if touch:
    4.74 @@ -332,7 +337,7 @@
    4.75      manifests = {}
    4.76      def for_platform(self, platform, arch = None):
    4.77          if arch:
    4.78 -            platform = platform + '_' + arch
    4.79 +            platform = platform + '_' + arch + '_'
    4.80          return self.manifests[platform.lower()]
    4.81      for_platform = classmethod(for_platform)
    4.82  
    4.83 @@ -349,8 +354,6 @@
    4.84          self.created_paths = []
    4.85          self.package_name = "Unknown"
    4.86          
    4.87 -    def default_grid(self):
    4.88 -        return self.args.get('grid', None) == ''
    4.89      def default_channel(self):
    4.90          return self.args.get('channel', None) == RELEASE_CHANNEL
    4.91  
     5.1 --- a/indra/newview/CMakeLists.txt	Fri Dec 06 16:02:53 2013 -0500
     5.2 +++ b/indra/newview/CMakeLists.txt	Mon Dec 09 15:29:21 2013 -0500
     5.3 @@ -1748,6 +1748,7 @@
     5.4        ARGS
     5.5          ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
     5.6          --actions=copy
     5.7 +        --arch=${ARCH}
     5.8          --artwork=${ARTWORK_DIR}
     5.9          --build=${CMAKE_CURRENT_BINARY_DIR}
    5.10          --buildtype=${CMAKE_BUILD_TYPE}
    5.11 @@ -1815,6 +1816,7 @@
    5.12          COMMAND ${PYTHON_EXECUTABLE}
    5.13          ARGS
    5.14            ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
    5.15 +          --arch=${ARCH}
    5.16            --artwork=${ARTWORK_DIR}
    5.17            --build=${CMAKE_CURRENT_BINARY_DIR}
    5.18            --buildtype=${CMAKE_BUILD_TYPE}
    5.19 @@ -1939,7 +1941,6 @@
    5.20          --configuration=${CMAKE_CFG_INTDIR}
    5.21          --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged
    5.22          --grid=${GRID}
    5.23 -        --installer_name=${product}
    5.24          --source=${CMAKE_CURRENT_SOURCE_DIR}
    5.25          --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
    5.26        DEPENDS
    5.27 @@ -2017,6 +2018,7 @@
    5.28      ARGS
    5.29        ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
    5.30        --actions=copy
    5.31 +      --arch=${ARCH}
    5.32        --artwork=${ARTWORK_DIR}
    5.33        --build=${CMAKE_CURRENT_BINARY_DIR}
    5.34        --buildtype=${CMAKE_BUILD_TYPE}
    5.35 @@ -2049,6 +2051,7 @@
    5.36          COMMAND ${PYTHON_EXECUTABLE}
    5.37          ARGS
    5.38            ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
    5.39 +          --arch=${ARCH}
    5.40            --artwork=${ARTWORK_DIR}
    5.41            --build=${CMAKE_CURRENT_BINARY_DIR}
    5.42            --buildtype=${CMAKE_BUILD_TYPE}
     6.1 --- a/indra/newview/VIEWER_VERSION.txt	Fri Dec 06 16:02:53 2013 -0500
     6.2 +++ b/indra/newview/VIEWER_VERSION.txt	Mon Dec 09 15:29:21 2013 -0500
     6.3 @@ -1,1 +1,1 @@
     6.4 -3.6.12
     6.5 +3.6.13
     7.1 --- a/indra/newview/installers/windows/installer_template.nsi	Fri Dec 06 16:02:53 2013 -0500
     7.2 +++ b/indra/newview/installers/windows/installer_template.nsi	Mon Dec 09 15:29:21 2013 -0500
     7.3 @@ -72,16 +72,8 @@
     7.4  LangString LanguageCode ${LANG_TURKISH}  "tr"
     7.5  LangString LanguageCode ${LANG_TRADCHINESE}  "zh"
     7.6  
     7.7 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     7.8 -;; Tweak for different servers/builds (this placeholder is replaced by viewer_manifest.py)
     7.9 -;; For example:
    7.10 -;; !define INSTFLAGS "%(flags)s"
    7.11 -;; !define INSTNAME   "SecondLife%(grid_caps)s"
    7.12 -;; !define SHORTCUT   "Second Life (%(grid_caps)s)"
    7.13 -;; !define URLNAME   "secondlife%(grid)s"
    7.14 -;; !define UNINSTALL_SETTINGS 1
    7.15 -
    7.16 -%%GRID_VARS%%
    7.17 +;; this placeholder is replaced by viewer_manifest.py
    7.18 +%%INST_VARS%%
    7.19  
    7.20  Name ${INSTNAME}
    7.21  
    7.22 @@ -109,7 +101,6 @@
    7.23  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    7.24  Var INSTPROG
    7.25  Var INSTEXE
    7.26 -Var INSTFLAGS
    7.27  Var INSTSHORTCUT
    7.28  Var COMMANDLINE         ; command line passed to this installer, set in .onInit
    7.29  Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer
    7.30 @@ -147,7 +138,7 @@
    7.31          
    7.32  label_launch:
    7.33  	# Assumes SetOutPath $INSTDIR
    7.34 -	Exec '"$INSTDIR\$INSTEXE" $INSTFLAGS $SHORTCUT_LANG_PARAM'
    7.35 +	Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM'
    7.36  label_no_launch:
    7.37  	Pop $R0
    7.38  FunctionEnd
    7.39 @@ -720,7 +711,6 @@
    7.40  Section Uninstall
    7.41  
    7.42  ; Start with some default values.
    7.43 -StrCpy $INSTFLAGS ""
    7.44  StrCpy $INSTPROG "${INSTNAME}"
    7.45  StrCpy $INSTEXE "${INSTEXE}"
    7.46  StrCpy $INSTSHORTCUT "${SHORTCUT}"
    7.47 @@ -919,7 +909,6 @@
    7.48  SetShellVarContext all			; install for all users (if you change this, change it in the uninstall as well)
    7.49  
    7.50  ; Start with some default values.
    7.51 -StrCpy $INSTFLAGS "${INSTFLAGS}"
    7.52  StrCpy $INSTPROG "${INSTNAME}"
    7.53  StrCpy $INSTEXE "${INSTEXE}"
    7.54  StrCpy $INSTSHORTCUT "${SHORTCUT}"
    7.55 @@ -966,7 +955,7 @@
    7.56  CreateDirectory	"$SMPROGRAMS\$INSTSHORTCUT"
    7.57  SetOutPath "$INSTDIR"
    7.58  CreateShortCut	"$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \
    7.59 -				"$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM"
    7.60 +				"$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
    7.61  
    7.62  
    7.63  WriteINIStr		"$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \
    7.64 @@ -985,9 +974,9 @@
    7.65  ; Other shortcuts
    7.66  SetOutPath "$INSTDIR"
    7.67  CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \
    7.68 -        "$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM"
    7.69 +        "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
    7.70  CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \
    7.71 -        "$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM"
    7.72 +        "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
    7.73  CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \
    7.74  				'"$INSTDIR\uninst.exe"' ''
    7.75  
    7.76 @@ -996,7 +985,6 @@
    7.77  ; Write registry
    7.78  WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR"
    7.79  WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}"
    7.80 -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags" "$INSTFLAGS"
    7.81  WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT"
    7.82  WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE"
    7.83  WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)"
    7.84 @@ -1009,13 +997,13 @@
    7.85  WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"'
    7.86  ;; URL param must be last item passed to viewer, it ignores subsequent params
    7.87  ;; to avoid parameter injection attacks.
    7.88 -WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"'
    7.89 +WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"'
    7.90  WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info"(default)" "URL:Second Life"
    7.91  WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "URL Protocol" ""
    7.92  WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$INSTEXE"'
    7.93  ;; URL param must be last item passed to viewer, it ignores subsequent params
    7.94  ;; to avoid parameter injection attacks.
    7.95 -WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"'
    7.96 +WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"'
    7.97  
    7.98  ; write out uninstaller
    7.99  WriteUninstaller "$INSTDIR\uninst.exe"
     8.1 --- a/indra/newview/viewer_manifest.py	Fri Dec 06 16:02:53 2013 -0500
     8.2 +++ b/indra/newview/viewer_manifest.py	Mon Dec 09 15:29:21 2013 -0500
     8.3 @@ -38,7 +38,7 @@
     8.4  # Put it FIRST because some of our build hosts have an ancient install of
     8.5  # indra.util.llmanifest under their system Python!
     8.6  sys.path.insert(0, os.path.join(viewer_dir, os.pardir, "lib", "python"))
     8.7 -from indra.util.llmanifest import LLManifest, main, proper_windows_path, path_ancestors
     8.8 +from indra.util.llmanifest import LLManifest, main, proper_windows_path, path_ancestors, CHANNEL_VENDOR_BASE, RELEASE_CHANNEL
     8.9  try:
    8.10      from llbase import llsd
    8.11  except ImportError:
    8.12 @@ -112,21 +112,29 @@
    8.13                                    Persist=1,
    8.14                                    Type='String',
    8.15                                    Value=''),
    8.16 +                    CmdLineGridChoice=dict(Comment='Default grid',
    8.17 +                                  Persist=0,
    8.18 +                                  Type='String',
    8.19 +                                  Value=''),
    8.20                      CmdLineChannel=dict(Comment='Command line specified channel name',
    8.21                                          Persist=0,
    8.22                                          Type='String',
    8.23                                          Value=''))
    8.24                  settings_install = {}
    8.25 -                for key, setting in (("sourceid", "sourceid"),
    8.26 -                                     ("channel", "CmdLineChannel")):
    8.27 -                    if key in self.args:
    8.28 -                        # only set if value is non-empty
    8.29 -                        if self.args[key]:
    8.30 -                            # copy corresponding setting from settings_template
    8.31 -                            settings_install[setting] = settings_template[setting].copy()
    8.32 -                            # then fill in Value
    8.33 -                            settings_install[setting]["Value"] = self.args[key]
    8.34 -                            print "Put %s '%s' in settings_install.xml" % (setting, self.args[key])
    8.35 +                if 'sourceid' in self.args and self.args['sourceid']:
    8.36 +                    settings_install['sourceid'] = settings_template['sourceid'].copy()
    8.37 +                    settings_install['sourceid']['Value'] = self.args['sourceid']
    8.38 +                    print "Set sourceid in settings_install.xml to '%s'" % self.args['sourceid']
    8.39 +
    8.40 +                if 'channel_suffix' in self.args and self.args['channel_suffix']:
    8.41 +                    settings_install['CmdLineChannel'] = settings_template['CmdLineChannel'].copy()
    8.42 +                    settings_install['CmdLineChannel']['Value'] = self.channel_with_pkg_suffix()
    8.43 +                    print "Set CmdLineChannel in settings_install.xml to '%s'" % self.channel_with_pkg_suffix()
    8.44 +
    8.45 +                if 'grid' in self.args and self.args['grid']:
    8.46 +                    settings_install['CmdLineGridChoice'] = settings_template['CmdLineGridChoice'].copy()
    8.47 +                    settings_install['CmdLineGridChoice']['Value'] = self.grid()
    8.48 +                    print "Set CmdLineGridChoice in settings_install.xml to '%s'" % self.grid()
    8.49  
    8.50                  # did we actually copy anything into settings_install dict?
    8.51                  if settings_install:
    8.52 @@ -197,62 +205,72 @@
    8.53  
    8.54      def grid(self):
    8.55          return self.args['grid']
    8.56 +
    8.57      def channel(self):
    8.58          return self.args['channel']
    8.59 -    def channel_unique(self):
    8.60 -        return self.channel().replace("Second Life", "").strip()
    8.61 -    def channel_oneword(self):
    8.62 -        return "".join(self.channel_unique().split())
    8.63 -    def channel_lowerword(self):
    8.64 -        return self.channel_oneword().lower()
    8.65 +
    8.66 +    def channel_with_pkg_suffix(self):
    8.67 +        fullchannel=self.channel()
    8.68 +        if 'channel_suffix' in self.args and self.args['channel_suffix']:
    8.69 +            fullchannel+=' '+self.args['channel_suffix']
    8.70 +        return fullchannel
    8.71 +
    8.72 +    def channel_variant(self):
    8.73 +        global CHANNEL_VENDOR_BASE
    8.74 +        return self.channel().replace(CHANNEL_VENDOR_BASE, "").strip()
    8.75 +
    8.76 +    def channel_type(self): # returns 'release', 'beta', 'project', or 'test'
    8.77 +        global CHANNEL_VENDOR_BASE
    8.78 +        channel_qualifier=self.channel().replace(CHANNEL_VENDOR_BASE, "").lower().strip()
    8.79 +        if channel_qualifier.startswith('release'):
    8.80 +            channel_type='release'
    8.81 +        elif channel_qualifier.startswith('beta'):
    8.82 +            channel_type='beta'
    8.83 +        elif channel_qualifier.startswith('project'):
    8.84 +            channel_type='project'
    8.85 +        else:
    8.86 +            channel_type='test'
    8.87 +        return channel_type
    8.88 +
    8.89 +    def channel_variant_app_suffix(self):
    8.90 +        # get any part of the compiled channel name after the CHANNEL_VENDOR_BASE
    8.91 +        suffix=self.channel_variant()
    8.92 +        # by ancient convention, we don't use Release in the app name
    8.93 +        if self.channel_type() == 'release':
    8.94 +            suffix=suffix.replace('Release', '').strip()
    8.95 +        # for the base release viewer, suffix will now be null - for any other, append what remains
    8.96 +        if len(suffix) > 0:
    8.97 +            suffix = "_"+ ("_".join(suffix.split()))
    8.98 +        # the additional_packages mechanism adds more to the installer name (but not to the app name itself)
    8.99 +        if 'channel_suffix' in self.args and self.args['channel_suffix']:
   8.100 +            suffix+='_'+("_".join(self.args['channel_suffix'].split()))
   8.101 +        return suffix
   8.102 +
   8.103 +    def installer_base_name(self):
   8.104 +        global CHANNEL_VENDOR_BASE
   8.105 +        # a standard map of strings for replacing in the templates
   8.106 +        substitution_strings = {
   8.107 +            'channel_vendor_base' : '_'.join(CHANNEL_VENDOR_BASE.split()),
   8.108 +            'channel_variant_underscores':self.channel_variant_app_suffix(),
   8.109 +            'version_underscores' : '_'.join(self.args['version']),
   8.110 +            'arch':self.args['arch']
   8.111 +            }
   8.112 +        return "%(channel_vendor_base)s%(channel_variant_underscores)s_%(version_underscores)s_%(arch)s" % substitution_strings
   8.113  
   8.114      def app_name(self):
   8.115 -        app_suffix='Test'
   8.116 -        channel_type=self.channel_lowerword()
   8.117 -        if channel_type.startswith('release') :
   8.118 +        global CHANNEL_VENDOR_BASE
   8.119 +        channel_type=self.channel_type()
   8.120 +        if channel_type == 'release':
   8.121              app_suffix='Viewer'
   8.122 -        elif re.match('^(beta|project).*',channel_type) :
   8.123 -            app_suffix=self.channel_unique()
   8.124 -        return "Second Life "+app_suffix
   8.125 -        
   8.126 +        else:
   8.127 +            app_suffix=self.channel_variant()
   8.128 +        return CHANNEL_VENDOR_BASE + ' ' + app_suffix
   8.129 +
   8.130 +    def app_name_oneword(self):
   8.131 +        return ''.join(self.app_name().split())
   8.132 +    
   8.133      def icon_path(self):
   8.134 -        icon_path="icons/"
   8.135 -        channel_type=self.channel_lowerword()
   8.136 -        print "Icon channel type '%s'" % channel_type
   8.137 -        if channel_type.startswith('release') :
   8.138 -            icon_path += 'release'
   8.139 -        elif re.match('^beta.*',channel_type) :
   8.140 -            icon_path += 'beta'
   8.141 -        elif re.match('^project.*',channel_type) :
   8.142 -            icon_path += 'project'
   8.143 -        else :
   8.144 -            icon_path += 'test'
   8.145 -        return icon_path
   8.146 -
   8.147 -    def flags_list(self):
   8.148 -        """ Convenience function that returns the command-line flags
   8.149 -        for the grid"""
   8.150 -
   8.151 -        # The original role of this method seems to have been to build a
   8.152 -        # grid-specific viewer: one that would, on launch, preselect a
   8.153 -        # particular grid. (Apparently that dates back to when the protocol
   8.154 -        # between viewer and simulator required them to be updated in
   8.155 -        # lockstep, so that "the beta grid" required "a beta viewer.") But
   8.156 -        # those viewer command-line switches no longer work without tweaking
   8.157 -        # user_settings/grids.xml. In fact, going forward, it's unclear what
   8.158 -        # use case that would address.
   8.159 -
   8.160 -        # This method also set a channel-specific (or grid-and-channel-
   8.161 -        # specific) user_settings/settings_something.xml file. It has become
   8.162 -        # clear that saving user settings in a channel-specific file causes
   8.163 -        # more problems (confusion) than it solves, so we've discontinued that.
   8.164 -
   8.165 -        # In fact we now avoid forcing viewer command-line switches at all,
   8.166 -        # instead introducing a settings_install.xml file. Command-line
   8.167 -        # switches don't aggregate well; for instance the generated --channel
   8.168 -        # switch actually prevented the user specifying --channel on the
   8.169 -        # command line. Settings files have well-defined override semantics.
   8.170 -        return None
   8.171 +        return "icons/" + self.channel_type()
   8.172  
   8.173      def extract_names(self,src):
   8.174          try:
   8.175 @@ -277,15 +295,9 @@
   8.176          random.shuffle(names)
   8.177          return ', '.join(names)
   8.178  
   8.179 -class WindowsManifest(ViewerManifest):
   8.180 +class Windows_i686_Manifest(ViewerManifest):
   8.181      def final_exe(self):
   8.182 -        app_suffix="Test"
   8.183 -        channel_type=self.channel_lowerword()
   8.184 -        if channel_type.startswith('release') :
   8.185 -            app_suffix=''
   8.186 -        elif re.match('^(beta|project).*',channel_type) :
   8.187 -            app_suffix=''.join(self.channel_unique().split())
   8.188 -        return "SecondLife"+app_suffix+".exe"
   8.189 +        return self.app_name_oneword()+".exe"
   8.190  
   8.191      def test_msvcrt_and_copy_action(self, src, dst):
   8.192          # This is used to test a dll manifest.
   8.193 @@ -334,7 +346,7 @@
   8.194              print "Doesn't exist:", src
   8.195          
   8.196      def construct(self):
   8.197 -        super(WindowsManifest, self).construct()
   8.198 +        super(Windows_i686_Manifest, self).construct()
   8.199  
   8.200          if self.is_packaging_viewer():
   8.201              # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe.
   8.202 @@ -567,65 +579,33 @@
   8.203              'version_short' : '.'.join(self.args['version'][:-1]),
   8.204              'version_dashes' : '-'.join(self.args['version']),
   8.205              'final_exe' : self.final_exe(),
   8.206 -            'grid':self.args['grid'],
   8.207 -            'grid_caps':self.args['grid'].upper(),
   8.208              'flags':'',
   8.209 -            'channel':self.channel(),
   8.210 -            'channel_oneword':self.channel_oneword(),
   8.211 -            'channel_unique':self.channel_unique(),
   8.212 -            'subchannel_underscores':'_'.join(self.channel_unique().split())
   8.213 +            'app_name':self.app_name(),
   8.214 +            'app_name_oneword':self.app_name_oneword()
   8.215              }
   8.216  
   8.217 +        installer_file = self.installer_base_name() + '_Setup.exe'
   8.218 +        substitution_strings['installer_file'] = installer_file
   8.219 +        
   8.220          version_vars = """
   8.221          !define INSTEXE  "%(final_exe)s"
   8.222          !define VERSION "%(version_short)s"
   8.223          !define VERSION_LONG "%(version)s"
   8.224          !define VERSION_DASHES "%(version_dashes)s"
   8.225          """ % substitution_strings
   8.226 -        if self.default_channel():
   8.227 -            if self.default_grid():
   8.228 -                # release viewer
   8.229 -                installer_file = "Second_Life_%(version_dashes)s_Setup.exe"
   8.230 -                grid_vars_template = """
   8.231 -                OutFile "%(installer_file)s"
   8.232 -                !define INSTFLAGS "%(flags)s"
   8.233 -                !define INSTNAME   "SecondLifeViewer"
   8.234 -                !define SHORTCUT   "Second Life Viewer"
   8.235 -                !define URLNAME   "secondlife"
   8.236 -                Caption "Second Life"
   8.237 -                """
   8.238 -            else:
   8.239 -                # alternate grid viewer
   8.240 -                installer_file = "Second_Life_%(version_dashes)s_(%(grid_caps)s)_Setup.exe"
   8.241 -                grid_vars_template = """
   8.242 -                OutFile "%(installer_file)s"
   8.243 -                !define INSTFLAGS "%(flags)s"
   8.244 -                !define INSTNAME   "SecondLife%(grid_caps)s"
   8.245 -                !define SHORTCUT   "Second Life (%(grid_caps)s)"
   8.246 -                !define URLNAME   "secondlife%(grid)s"
   8.247 -                !define UNINSTALL_SETTINGS 1
   8.248 -                Caption "Second Life %(grid)s ${VERSION}"
   8.249 -                """
   8.250 +        
   8.251 +        if self.channel_type() == 'release':
   8.252 +            substitution_strings['caption'] = CHANNEL_VENDOR_BASE
   8.253          else:
   8.254 -            # some other channel (grid name not used)
   8.255 -            installer_file = "Second_Life_%(version_dashes)s_%(subchannel_underscores)s_Setup.exe"
   8.256 -            grid_vars_template = """
   8.257 +            substitution_strings['caption'] = self.app_name() + ' ${VERSION}'
   8.258 +
   8.259 +        inst_vars_template = """
   8.260              OutFile "%(installer_file)s"
   8.261 -            !define INSTFLAGS "%(flags)s"
   8.262 -            !define INSTNAME   "SecondLife%(channel_oneword)s"
   8.263 -            !define SHORTCUT   "%(channel)s"
   8.264 +            !define INSTNAME   "%(app_name_oneword)s"
   8.265 +            !define SHORTCUT   "%(app_name)s"
   8.266              !define URLNAME   "secondlife"
   8.267 -            !define UNINSTALL_SETTINGS 1
   8.268 -            Caption "%(channel)s ${VERSION}"
   8.269 +            Caption "%(caption)s"
   8.270              """
   8.271 -        if 'installer_name' in self.args:
   8.272 -            installer_file = self.args['installer_name']
   8.273 -        else:
   8.274 -            installer_file = installer_file % substitution_strings
   8.275 -        if len(self.args['package_id']) > 0:
   8.276 -            installer_file = installer_file.replace(self.args['package_id'], "")
   8.277 -            installer_file = installer_file.replace(".exe", self.args['package_id'] + ".exe")
   8.278 -        substitution_strings['installer_file'] = installer_file
   8.279  
   8.280          tempfile = "secondlife_setup_tmp.nsi"
   8.281          # the following replaces strings in the nsi template
   8.282 @@ -633,7 +613,7 @@
   8.283          self.replace_in("installers/windows/installer_template.nsi", tempfile, {
   8.284                  "%%VERSION%%":version_vars,
   8.285                  "%%SOURCE%%":self.get_src_prefix(),
   8.286 -                "%%GRID_VARS%%":grid_vars_template % substitution_strings,
   8.287 +                "%%INST_VARS%%":inst_vars_template % substitution_strings,
   8.288                  "%%INSTALL_FILES%%":self.nsi_file_commands(True),
   8.289                  "%%DELETE_FILES%%":self.nsi_file_commands(False)})
   8.290  
   8.291 @@ -663,7 +643,7 @@
   8.292          self.package_file = installer_file
   8.293  
   8.294  
   8.295 -class DarwinManifest(ViewerManifest):
   8.296 +class Darwin_i386_Manifest(ViewerManifest):
   8.297      def is_packaging_viewer(self):
   8.298          # darwin requires full app bundle packaging even for debugging.
   8.299          return True
   8.300 @@ -685,7 +665,7 @@
   8.301  
   8.302              # most everything goes in the Resources directory
   8.303              if self.prefix(src="", dst="Resources"):
   8.304 -                super(DarwinManifest, self).construct()
   8.305 +                super(Darwin_i386_Manifest, self).construct()
   8.306  
   8.307                  if self.prefix("cursors_mac"):
   8.308                      self.path("*.tif")
   8.309 @@ -821,6 +801,7 @@
   8.310              self.run_command("chmod +x %r" % os.path.join(self.get_dst_prefix(), script))
   8.311  
   8.312      def package_finish(self):
   8.313 +        global CHANNEL_VENDOR_BASE
   8.314          # Sign the app if requested.
   8.315          if 'signature' in self.args:
   8.316              identity = self.args['signature']
   8.317 @@ -850,17 +831,9 @@
   8.318          # MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning.
   8.319          #  If we really need differently named volumes, we'll need to create multiple DS_Store file images, or use some other trick.
   8.320  
   8.321 -        volname="Second Life Installer"  # DO NOT CHANGE without understanding comment above
   8.322 +        volname=CHANNEL_VENDOR_BASE+" Installer"  # DO NOT CHANGE without understanding comment above
   8.323  
   8.324 -        if len(self.args['package_id']) > 0:
   8.325 -            imagename = imagename + self.args['package_id']
   8.326 -        elif self.default_channel():
   8.327 -            if not self.default_grid():
   8.328 -                # beta case
   8.329 -                imagename = imagename + '_' + self.args['grid'].upper()
   8.330 -        else:
   8.331 -            # first look, etc
   8.332 -            imagename = imagename + '_' + self.channel_oneword().upper()
   8.333 +        imagename = self.installer_base_name()
   8.334  
   8.335          sparsename = imagename + ".sparseimage"
   8.336          finalname = imagename + ".dmg"
   8.337 @@ -894,7 +867,7 @@
   8.338              # will use the release .DS_Store, and will look broken.
   8.339              # - Ambroff 2008-08-20
   8.340              dmg_template = os.path.join(
   8.341 -                'installers', 'darwin', '%s-dmg' % self.channel_lowerword())
   8.342 +                'installers', 'darwin', '%s-dmg' % self.channel_type())
   8.343  
   8.344              if not os.path.exists (self.src_path_of(dmg_template)):
   8.345                  dmg_template = os.path.join ('installers', 'darwin', 'release-dmg')
   8.346 @@ -977,8 +950,9 @@
   8.347              # recurse
   8.348              self.end_prefix("res-sdl")
   8.349  
   8.350 -        # Get the icons based on the channel
   8.351 +        # Get the icons based on the channel type
   8.352          icon_path = self.icon_path()
   8.353 +        print "DEBUG: icon_path '%s'" % icon_path
   8.354          if self.prefix(src=icon_path, dst="") :
   8.355              self.path("secondlife_256.png","secondlife_icon.png")
   8.356              if self.prefix(src="",dst="res-sdl") :
   8.357 @@ -1004,18 +978,7 @@
   8.358              self.run_command("chmod +x %r" % os.path.join(self.get_dst_prefix(), script))
   8.359  
   8.360      def package_finish(self):
   8.361 -        if 'installer_name' in self.args:
   8.362 -            installer_name = self.args['installer_name']
   8.363 -        else:
   8.364 -            installer_name_components = ['SecondLife_', self.args.get('arch')]
   8.365 -            installer_name_components.extend(self.args['version'])
   8.366 -            installer_name = "_".join(installer_name_components)
   8.367 -            if self.default_channel():
   8.368 -                if not self.default_grid():
   8.369 -                    installer_name += '_' + self.args['grid'].upper()
   8.370 -            else:
   8.371 -                installer_name += '_' + self.channel_oneword().upper()
   8.372 -        installer_name = installer_name + self.args['package_id']
   8.373 +        installer_name = self.installer_base_name()
   8.374  
   8.375          self.strip_binaries()
   8.376  
   8.377 @@ -1057,9 +1020,9 @@
   8.378              print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build"
   8.379              self.run_command(r"find %(d)r/bin %(d)r/lib -type f \! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure
   8.380  
   8.381 -class Linux_i686Manifest(LinuxManifest):
   8.382 +class Linux_i686_Manifest(LinuxManifest):
   8.383      def construct(self):
   8.384 -        super(Linux_i686Manifest, self).construct()
   8.385 +        super(Linux_i686_Manifest, self).construct()
   8.386  
   8.387          if self.prefix("../packages/lib/release", dst="lib"):
   8.388              self.path("libapr-1.so")
   8.389 @@ -1145,9 +1108,9 @@
   8.390              self.strip_binaries()
   8.391  
   8.392  
   8.393 -class Linux_x86_64Manifest(LinuxManifest):
   8.394 +class Linux_x86_64_Manifest(LinuxManifest):
   8.395      def construct(self):
   8.396 -        super(Linux_x86_64Manifest, self).construct()
   8.397 +        super(Linux_x86_64_Manifest, self).construct()
   8.398  
   8.399          # support file for valgrind debug tool
   8.400          self.path("secondlife-i686.supp")
     9.1 --- a/indra/viewer_components/updater/llupdatedownloader.cpp	Fri Dec 06 16:02:53 2013 -0500
     9.2 +++ b/indra/viewer_components/updater/llupdatedownloader.cpp	Mon Dec 09 15:29:21 2013 -0500
     9.3 @@ -77,7 +77,8 @@
     9.4  	void run(void);
     9.5  	void startDownloading(LLURI const & uri, std::string const & hash);
     9.6  	void throwOnCurlError(CURLcode code);
     9.7 -	bool validateDownload(void);
     9.8 +	bool validateDownload(const std::string& filePath);
     9.9 +	bool validateOrRemove(const std::string& filePath);
    9.10  
    9.11  	LOG_CLASS(LLUpdateDownloader::Implementation);
    9.12  };
    9.13 @@ -295,9 +296,8 @@
    9.14  			{
    9.15  				resumeDownloading(fileStatus.st_size);
    9.16  			}
    9.17 -			else if(!validateDownload())
    9.18 +			else if(!validateOrRemove(filePath))
    9.19  			{
    9.20 -				LLFile::remove(filePath);
    9.21  				download(LLURI(mDownloadData["url"].asString()),
    9.22  						 mDownloadData["hash"].asString(),
    9.23  						 mDownloadData["update_channel"].asString(),
    9.24 @@ -421,19 +421,13 @@
    9.25  	if(code == CURLE_OK)
    9.26  	{
    9.27  		LLFile::remove(mDownloadRecordPath);
    9.28 -		if(validateDownload())
    9.29 +		if(validateOrRemove(mDownloadData["path"]))
    9.30  		{
    9.31  			LL_INFOS("UpdaterService") << "download successful" << LL_ENDL;
    9.32  			mClient.downloadComplete(mDownloadData);
    9.33  		}
    9.34  		else
    9.35  		{
    9.36 -			LL_INFOS("UpdaterService") << "download failed hash check" << LL_ENDL;
    9.37 -			std::string filePath = mDownloadData["path"].asString();
    9.38 -			if(filePath.size() != 0)
    9.39 -			{
    9.40 -				LLFile::remove(filePath);
    9.41 -			}
    9.42  			mClient.downloadError("failed hash check");
    9.43  		}
    9.44  	}
    9.45 @@ -449,7 +443,9 @@
    9.46  		LLFile::remove(mDownloadRecordPath);
    9.47  		if(mDownloadData.has("path"))
    9.48  		{
    9.49 -			LLFile::remove(mDownloadData["path"].asString());
    9.50 +			std::string filePath = mDownloadData["path"].asString();
    9.51 +			LL_INFOS("UpdaterService") << "removing " << filePath << LL_ENDL;
    9.52 +			LLFile::remove(filePath);
    9.53  		}
    9.54  		mClient.downloadError("curl error");
    9.55  	}
    9.56 @@ -561,31 +557,49 @@
    9.57  	}
    9.58  }
    9.59  
    9.60 +bool LLUpdateDownloader::Implementation::validateOrRemove(const std::string& filePath)
    9.61 +{
    9.62 +	bool valid = validateDownload(filePath);
    9.63 +	if (! valid)
    9.64 +	{
    9.65 +		LL_INFOS("UpdaterService") << "removing " << filePath << LL_ENDL;
    9.66 +		LLFile::remove(filePath);
    9.67 +	}
    9.68 +	return valid;
    9.69 +}
    9.70  
    9.71 -bool LLUpdateDownloader::Implementation::validateDownload(void)
    9.72 +bool LLUpdateDownloader::Implementation::validateDownload(const std::string& filePath)
    9.73  {
    9.74 -	std::string filePath = mDownloadData["path"].asString();
    9.75  	llifstream fileStream(filePath, std::ios_base::in | std::ios_base::binary);
    9.76  	if(!fileStream)
    9.77  	{
    9.78 +		LL_INFOS("UpdaterService") << "can't open " << filePath << ", invalid" << LL_ENDL;
    9.79  		return false;
    9.80  	}
    9.81  
    9.82  	std::string hash = mDownloadData["hash"].asString();
    9.83 -	if(hash.size() != 0)
    9.84 +	if (! hash.empty())
    9.85  	{
    9.86 -		LL_INFOS("UpdaterService") << "checking hash..." << LL_ENDL;
    9.87  		char digest[33];
    9.88  		LLMD5(fileStream).hex_digest(digest);
    9.89 -		if(hash != digest)
    9.90 +		if (hash == digest)
    9.91  		{
    9.92 -			LL_WARNS("UpdaterService") << "download hash mismatch; expected " << hash <<
    9.93 -				" but download is " << digest << LL_ENDL;
    9.94 +			LL_INFOS("UpdaterService") << "verified hash " << hash
    9.95 +									   << " for downloaded " << filePath << LL_ENDL;
    9.96 +			return true;
    9.97  		}
    9.98 -		return hash == digest;
    9.99 +		else
   9.100 +		{
   9.101 +			LL_WARNS("UpdaterService") << "download hash mismatch for "
   9.102 +									   << filePath << ": expected " << hash
   9.103 +									   << " but computed " << digest << LL_ENDL;
   9.104 +			return false;
   9.105 +		}
   9.106  	}
   9.107  	else
   9.108  	{
   9.109 +		LL_INFOS("UpdaterService") << "no hash specified for " << filePath
   9.110 +								   << ", unverified" << LL_ENDL;
   9.111  		return true; // No hash check provided.
   9.112  	}
   9.113  }
    10.1 --- a/indra/viewer_components/updater/llupdaterservice.cpp	Fri Dec 06 16:02:53 2013 -0500
    10.2 +++ b/indra/viewer_components/updater/llupdaterservice.cpp	Mon Dec 09 15:29:21 2013 -0500
    10.3 @@ -296,37 +296,49 @@
    10.4  		update_marker.close();
    10.5  
    10.6  		// Get the path to the installer file.
    10.7 -		LLSD path = update_info.get("path");
    10.8 -		if(update_info["current_version"].asString() != ll_get_version())
    10.9 +		std::string path(update_info.get("path"));
   10.10 +		std::string downloader_version(update_info["current_version"]);
   10.11 +		if (downloader_version != ll_get_version())
   10.12  		{
   10.13  			// This viewer is not the same version as the one that downloaded
   10.14 -			// the update.  Do not install this update.
   10.15 -			if(!path.asString().empty())
   10.16 +			// the update. Do not install this update.
   10.17 +			LL_INFOS("UpdaterService") << "ignoring update downloaded by "
   10.18 +									   << "different viewer version "
   10.19 +									   << downloader_version << LL_ENDL;
   10.20 +			if (! path.empty())
   10.21  			{
   10.22 -				LL_INFOS("UpdaterService") << "ignoring update dowloaded by different client version" << LL_ENDL;;
   10.23 -				LLFile::remove(path.asString());
   10.24 +				LL_INFOS("UpdaterService") << "removing " << path << LL_ENDL;
   10.25 +				LLFile::remove(path);
   10.26  				LLFile::remove(update_marker_path());
   10.27  			}
   10.28 -			else
   10.29 -			{
   10.30 -				; // Nothing to clean up.
   10.31 -			}
   10.32 -			
   10.33 +
   10.34  			foundInstall = false;
   10.35  		} 
   10.36 -		else if(path.isDefined() && !path.asString().empty())
   10.37 +		else if (path.empty())
   10.38 +		{
   10.39 +			LL_WARNS("UpdaterService") << "Marker file " << update_marker_path()
   10.40 +									   << " 'path' entry empty, ignoring" << LL_ENDL;
   10.41 +			foundInstall = false;
   10.42 +		}
   10.43 +		else if (! LLFile::isfile(path))
   10.44 +		{
   10.45 +			LL_WARNS("UpdaterService") << "Nonexistent installer " << path
   10.46 +									   << ", ignoring" << LL_ENDL;
   10.47 +			foundInstall = false;
   10.48 +		}
   10.49 +		else
   10.50  		{
   10.51  			if(launchInstaller)
   10.52  			{
   10.53  				setState(LLUpdaterService::INSTALLING);
   10.54 -				
   10.55 +
   10.56  				LLFile::remove(update_marker_path());
   10.57  
   10.58  				int result = ll_install_update(install_script_path(),
   10.59 -											   update_info["path"].asString(),
   10.60 +											   path,
   10.61  											   update_info["required"].asBoolean(),
   10.62  											   install_script_mode());	
   10.63 -				
   10.64 +
   10.65  				if((result == 0) && mAppExitCallback)
   10.66  				{
   10.67  					mAppExitCallback();
   10.68 @@ -360,7 +372,8 @@
   10.69  			LLSD download_info;
   10.70  			LLSDSerialize::fromXMLDocument(download_info, download_marker_stream);
   10.71  			download_marker_stream.close();
   10.72 -			if(download_info["current_version"].asString() == ll_get_version())
   10.73 +			std::string downloader_version(download_info["current_version"]);
   10.74 +			if (downloader_version == ll_get_version())
   10.75  			{
   10.76  				mIsDownloading = true;
   10.77  				mNewVersion = download_info["update_version"].asString();
   10.78 @@ -371,10 +384,13 @@
   10.79  			else 
   10.80  			{
   10.81  				// The viewer that started this download is not the same as this viewer; ignore.
   10.82 -				LL_INFOS("UpdaterService") << "ignoring partial download from different viewer version" << LL_ENDL;;
   10.83 +				LL_INFOS("UpdaterService") << "ignoring partial download "
   10.84 +										   << "from different viewer version "
   10.85 +										   << downloader_version << LL_ENDL;
   10.86  				std::string path = download_info["path"].asString();
   10.87  				if(!path.empty())
   10.88  				{
   10.89 +					LL_INFOS("UpdaterService") << "removing " << path << LL_ENDL;
   10.90  					LLFile::remove(path);
   10.91  				}
   10.92  				LLFile::remove(download_marker_path);
   10.93 @@ -539,7 +555,7 @@
   10.94  		// Check for failed install.
   10.95  		if(LLFile::isfile(ll_install_failed_marker_path()))
   10.96  		{
   10.97 -			LL_DEBUGS("UpdaterService") << "found marker " << ll_install_failed_marker_path() << LL_ENDL;;
   10.98 +			LL_DEBUGS("UpdaterService") << "found marker " << ll_install_failed_marker_path() << LL_ENDL;
   10.99  			int requiredValue = 0; 
  10.100  			{
  10.101  				llifstream stream(ll_install_failed_marker_path());
  10.102 @@ -552,12 +568,12 @@
  10.103  			// TODO: notify the user.
  10.104  			LL_WARNS("UpdaterService") << "last install attempt failed" << LL_ENDL;;
  10.105  			LLFile::remove(ll_install_failed_marker_path());
  10.106 -			
  10.107 +
  10.108  			LLSD event;
  10.109  			event["type"] = LLSD(LLUpdaterService::INSTALL_ERROR);
  10.110  			event["required"] = LLSD(requiredValue);
  10.111  			LLEventPumps::instance().obtain(LLUpdaterService::pumpName()).post(event);
  10.112 -			
  10.113 +
  10.114  			setState(LLUpdaterService::TERMINAL);
  10.115  		}
  10.116  		else
    11.1 --- a/indra/viewer_components/updater/scripts/darwin/update_install.py	Fri Dec 06 16:02:53 2013 -0500
    11.2 +++ b/indra/viewer_components/updater/scripts/darwin/update_install.py	Mon Dec 09 15:29:21 2013 -0500
    11.3 @@ -199,6 +199,11 @@
    11.4          # prepare for other cleanup
    11.5          with Janitor(LOGF) as janitor:
    11.6  
    11.7 +            # Under some circumstances, this script seems to be invoked with a
    11.8 +            # nonexistent pathname. Check for that.
    11.9 +            if not os.path.isfile(dmgfile):
   11.10 +                fail(dmgfile + " has been deleted")
   11.11 +
   11.12              # Try to derive the name of the running viewer app bundle from our
   11.13              # own pathname. (Hopefully the old viewer won't copy this script
   11.14              # to a temp dir before running!)
   11.15 @@ -376,6 +381,13 @@
   11.16              log(' '.join(command))
   11.17              subprocess.check_call(command, stdout=LOGF, stderr=subprocess.STDOUT)
   11.18  
   11.19 +        # If all the above succeeded, delete the .dmg file. We don't do this
   11.20 +        # as a janitor.later() operation because we only want to do it if we
   11.21 +        # get this far successfully. Note that this is out of the scope of the
   11.22 +        # Janitor: we must detach the .dmg before removing it!
   11.23 +        log("rm " + dmgfile)
   11.24 +        os.remove(dmgfile)
   11.25 +
   11.26      except Exception, err:
   11.27          # Because we carefully set sys.excepthook -- and even modify it to log
   11.28          # the problem once we have our log file open -- you might think we

mercurial