py/toolkit: Remove var folders from installation.

The new toolkit system does not sync/copy /var any more, and expects
everything to be on /usr/local/factory. Installer should then stop
checking var related folders.

BUG=chromium:577601
TEST=make toolkit; scp build/*.run root@dut:/tmp;
     (dut) /tmp/install_factory_toolkit.run

Change-Id: I83db92f8dc220fddb2f794cf02572fc219d30df6
Reviewed-on: https://chromium-review.googlesource.com/401123
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>
diff --git a/py/toolkit/installer.py b/py/toolkit/installer.py
index 8b46eff..72a2475 100755
--- a/py/toolkit/installer.py
+++ b/py/toolkit/installer.py
@@ -117,7 +117,6 @@
     self._system_root = system_root
     if dest == self._system_root:
       self._usr_local_dest = os.path.join(dest, 'usr', 'local')
-      self._var_dest = os.path.join(dest, 'var')
 
       # Make sure we're on a CrOS device.
       if not non_cros and not sys_utils.InCrOSDevice():
@@ -143,15 +142,12 @@
                         'CrOS device.')
     else:
       self._usr_local_dest = os.path.join(dest, 'dev_image')
-      self._var_dest = os.path.join(dest, 'var_overlay')
-      if (not os.path.exists(self._usr_local_dest) or
-          not os.path.exists(self._var_dest)):
+      if not os.path.exists(self._usr_local_dest):
         raise Exception(
             'The destination path %s is not a stateful partition!' % dest)
 
     self._dest = dest
     self._usr_local_src = os.path.join(src, 'usr', 'local')
-    self._var_src = os.path.join(src, 'var')
     self._no_enable = no_enable
     self._tag_file = os.path.join(self._usr_local_dest, 'factory', 'enabled')
 
@@ -165,8 +161,7 @@
     self._device_id = device_id
     self._apps = apps
 
-    if (not os.path.exists(self._usr_local_src) or
-        not os.path.exists(self._var_src)):
+    if not os.path.exists(self._usr_local_src):
       raise Exception(
           'This installer must be run from within the factory toolkit!')
 
@@ -287,8 +282,7 @@
 
   def Install(self):
     print '*** Installing factory toolkit...'
-    for src, dest in ((self._usr_local_src, self._usr_local_dest),
-                      (self._var_src, self._var_dest)):
+    for src, dest in ((self._usr_local_src, self._usr_local_dest),):
       # Change the source directory to root, and add group/world read
       # permissions.  This is necessary because when the toolkit was
       # unpacked, the user may not have been root so the permessions