Touch the file in the correct folder.
We don't copy everything from the staging dir to the imaging dir. In order
to update "Freshness" of a dir, we should be touching the final destination
not the temporary staging dir.
BUG=chromium-os:35351
TEST=Ran through one full download -- looked at image dir.
Change-Id: I6fad4e0d8c1bb3b20e9ad76630d5233009473289
Reviewed-on: https://gerrit.chromium.org/gerrit/35643
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
diff --git a/downloader.py b/downloader.py
index 523c0d5..95b0d7d 100755
--- a/downloader.py
+++ b/downloader.py
@@ -114,7 +114,7 @@
# which would not be qualified as part of the suffix.
self._staging_dir = tempfile.mkdtemp(suffix='_'.join(
[rel_path.replace('/', '_'), short_build]))
- Downloader._TouchTimestampForStaged(self._staging_dir)
+ Downloader._TouchTimestampForStaged(self._build_dir)
self._Log('Gathering download requirements %s' % archive_url)
artifacts = self.GatherArtifactDownloads(
self._staging_dir, archive_url, self._build_dir, short_build)
@@ -204,8 +204,8 @@
self._status_queue.put(status)
# If someone is curious about the status of a build, then we should
# probably keep it around for a bit longer.
- if self._staging_dir and os.path.exists(self._staging_dir):
- Downloader._TouchTimestampForStaged(self._staging_dir)
+ if self._build_dir and os.path.exists(self._build_dir):
+ Downloader._TouchTimestampForStaged(self._build_dir)
# It's possible we received an exception, if so, re-raise it here.
if isinstance(status, Exception):
raise status