myre = re.compile('^[A-Z]+$')
null_byte = "\0"
for filename in listdir(infodir,filesonly=1,EmptyOnError=1):
+ if filename == "FEATURES":
+ # FEATURES from the build host shouldn't be interpreted as
+ # FEATURES on the client system.
+ continue
if myre.match(filename):
try:
file_path = os.path.join(infodir, filename)
"confcache":{
"basedir_var":"CONFCACHE_DIR",
"default_dir":os.path.join(mysettings["PORTAGE_TMPDIR"], "confcache"),
- "always_recurse":True},
+ "always_recurse":False},
"distcc":{
"basedir_var":"DISTCC_DIR",
"default_dir":os.path.join(mysettings["BUILD_PREFIX"], ".distcc"),
"subdirs":("lock", "state"),
- "always_recurse":True}
+ "always_recurse":False}
}
dirmode = 02070
filemode = 060
for subdir in kwargs["subdirs"]:
mydirs.append(os.path.join(basedir, subdir))
for mydir in mydirs:
- modified = portage.util.ensure_dirs(mydir,
- gid=portage_gid, mode=dirmode, mask=modemask)
- # To avoid excessive recursive stat calls, we trigger
- # recursion when the top level directory does not initially
- # match our permission requirements.
+ modified = portage.util.ensure_dirs(mydir)
+ # Generally, we only want to apply permissions for
+ # initial creation. Otherwise, we don't know exactly what
+ # permissions the user wants, so should leave them as-is.
if modified or kwargs["always_recurse"]:
if modified:
writemsg("Adjusting permissions recursively: '%s'\n" % mydir,
vartree = db[root]["vartree"]
self.vartree = vartree
self._aux_cache_keys = set(["SLOT", "COUNTER", "PROVIDE", "USE",
- "IUSE", "DEPEND", "RDEPEND", "PDEPEND"])
+ "IUSE", "DEPEND", "RDEPEND", "PDEPEND", "NEEDED"])
self._aux_cache = None
self._aux_cache_version = "1"
self._aux_cache_filename = os.path.join(self.root,
if pkg_data:
cache_mtime, metadata = pkg_data
cache_valid = cache_mtime == mydir_mtime
- if cache_valid and set(metadata) != self._aux_cache_keys:
+ if cache_valid:
+ cache_incomplete = self._aux_cache_keys.difference(metadata)
+ if cache_incomplete:
# Allow self._aux_cache_keys to change without a cache version
- # bump.
+ # bump and efficiently recycle partial cache whenever possible.
cache_valid = False
- if cache_valid:
+ pull_me = cache_incomplete.union(wants)
+ else:
+ pull_me = set(wants).difference(self._aux_cache_keys)
mydata.update(metadata)
- pull_me = set(wants).difference(self._aux_cache_keys)
else:
pull_me = self._aux_cache_keys.union(wants)
if pull_me: