Really fix up the lightweight install this time. We were still copying
over profilers, but rather than trying to fix up the code that copies
them over I just droped that part of the install and excluded them
entirely again. This isn't a problem so long as we drop an __init__.py
inside the dirs we exclude.

Risk: Low
Visibility: Fix up the lightweight install properly

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3639 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/autotest.py b/server/autotest.py
index cec499a..c3144ed 100644
--- a/server/autotest.py
+++ b/server/autotest.py
@@ -136,12 +136,8 @@
                     "PACKAGES", "serve_packages_from_autoserv", type=bool)
                 # Copy autotest recursively
                 if supports_autoserv_packaging and not no_autoserv:
-                    dirs_to_exclude = set(["tests", "site_tests", "deps"])
-                    profiler_dir = os.path.join(self.source_material,
-                                                "profilers")
-                    for f in os.listdir(profiler_dir):
-                        if os.path.isdir(os.path.join(profiler_dir, f)):
-                            dirs_to_exclude.add(f)
+                    dirs_to_exclude = set(["tests", "site_tests", "deps",
+                                           "profilers"])
                     light_files = [os.path.join(self.source_material, f)
                                    for f in os.listdir(self.source_material)
                                    if f not in dirs_to_exclude]
@@ -153,6 +149,7 @@
                         abs_path = os.path.join(autodir, path)
                         abs_path = utils.sh_escape(abs_path)
                         commands.append("mkdir -p '%s'" % abs_path)
+                        commands.append("touch '%s'/__init__.py" % abs_path)
                     host.run(';'.join(commands))
                 else:
                     host.send_file(self.source_material, autodir,