From ea2bcf4808bc3548e5653cbb822fad7b5eb0b073 Mon Sep 17 00:00:00 2001 From: Whit Morriss Date: Wed, 8 Feb 2012 14:11:09 -0800 Subject: [PATCH] hack to make sure index always generated on startup. - TODO: observe when a new package (not just a version) is added --- cheeseprism/index.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cheeseprism/index.py b/cheeseprism/index.py index 4431d17..606c2d0 100644 --- a/cheeseprism/index.py +++ b/cheeseprism/index.py @@ -222,7 +222,13 @@ def bulk_update_index_at_start(event): arch_baseurl=abu) new_pkgs = index.update_data(datafile) - return list(notify_packages_added(index, new_pkgs, reg)) + pkg_added = list(notify_packages_added(index, new_pkgs, reg)) + + home_file = index.path / index.root_index_file + if not home_file.exists(): + items = index.projects_from_archives() + index.write_index_home(home_file, items) + return pkg_added class EnvFactory(object):