Fix devserver with handling custom labels and add preference to always use cached image.
Change-Id: I701cba5bb9ad91a2574e8b309e8fafda528d7bc5
BUG=7152 5924
TEST=Tested with archive_dir and label set using example from dale. Also tested with factory options that are archive_build with dir and updater using default options. Url's are correct in both places
Review URL: http://codereview.chromium.org/3533003
diff --git a/devserver.py b/devserver.py
index eecab04..e4516a8 100644
--- a/devserver.py
+++ b/devserver.py
@@ -93,6 +93,8 @@
parser.add_option('-t', action='store_true', dest='test_image')
parser.add_option('-u', '--urlbase', dest='urlbase',
help='base URL, other than devserver, for update images.')
+ parser.add_option('--use_cached', action="store_true", default=False,
+ help='Prefer cached image regardless of timestamps.')
parser.add_option('--validate_factory_config', action="store_true",
dest='validate_factory_config',
help='Validate factory config file, then exit.')
@@ -124,7 +126,8 @@
test_image=options.test_image,
factory_config_path=options.factory_config,
client_prefix=options.client_prefix,
- forced_image=options.image)
+ forced_image=options.image,
+ use_cached=options.use_cached)
if options.factory_config:
updater.ImportFactoryConfigFile(options.factory_config,