layout.conf: allow a repository to state the cache is authorative
authorBrian Harring <ferringb@chromium.org>
Fri, 30 Sep 2011 09:37:04 +0000 (02:37 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 30 Sep 2011 17:32:34 +0000 (10:32 -0700)
commita72a01746638debe472496bd8fc661992a6ba08b
tree68ab715443a3b4650a7440aad6179add386eba88
parentc2efbad8402a7e8904c7353a9930e87ea128b962
layout.conf: allow a repository to state the cache is authorative

By authorative, this means "the cache is accurate; skip validation".  While
a useful hint for a slight speedup in validation, the true gain is for
repositories that are distributed in a fashion that doesn't preserve mtime;
git primarily.  Setting authorative-cache = true results in portage
skipping mtime validation checks for the bundled cache, allowing
for git vcs based repos to distribute a cache.

BUG=chromium-os:21049
TEST=dump a cache into metadata/cache, touch it to now, set layout.conf
     to authorative-cache=true, verify it doesn't generate cache entries
     for that repo.

Change-Id: I92423e679bc171d2411a18d6d3ac22e8ef457753
pym/portage/cache/template.py
pym/portage/dbapi/porttree.py
pym/portage/repository/config.py