From: Fabian Groffen Date: Tue, 10 Apr 2007 15:47:43 +0000 (-0000) Subject: Merged from trunk 6353:6362 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=88a4bda67eb8ffb026e62fd80d238ab57b94f186;p=portage.git Merged from trunk 6353:6362 +------------------------------------------------------------------------+ | 6354 | Only apply permissions to ccache, confcache, and distcc dirs | | zmedico | when they are created in order to avoid interference with | | | whatever the user's preferred permissions are. Thanks to | | | Diego Pettenò for reporting. | |---------+--------------------------------------------------------------| | 6356 | Cache NEEDED in order to optimize update_library_map() | | zmedico | calls. | |---------+--------------------------------------------------------------| | 6357 | Update the FEATURES=strict docs for better clarity. Thanks | | zmedico | to taviso for reporting. | |---------+--------------------------------------------------------------| | 6358 | Don't load FEATURES in load_infodir() because FEATURES from | | zmedico | the build host shouldn't be interpreted asFEATURES on the | | | client system. Thanks to Thanks to Chri | |---------+--------------------------------------------------------------| | 6360 | Efficiently recycle partial valid vdb cache when possible. | | zmedico | This reduces disk load when switching between versions of | | | portage that cache different keys. | |---------+--------------------------------------------------------------| | 6362 | For bug #173808, compress ${mandir} all in one go instead of | | zmedico | doing subdirectories separately. This allows symlinks that | | | point into sibling directories to get updated properly be | | | ecompressdir. | +------------------------------------------------------------------------+ svn path=/main/branches/prefix/; revision=6368 --- diff --git a/bin/prepman b/bin/prepman index 8588b8d25..2f694ec26 100755 --- a/bin/prepman +++ b/bin/prepman @@ -14,15 +14,4 @@ if [[ ! -d ${mandir} ]] ; then exit 0 fi -shopt -s nullglob - -ret=0 - -# compress and fixup links in each dir -for subdir in "${mandir}"/man* "${mandir}"/*/man* ; do - [[ -d ${subdir} ]] || continue # ignore files named 'man*' - ecompressdir "/${subdir#${ED}}" - ((ret+=$?)) -done - -exit ${ret} +exec ecompressdir "${mandir#${ED}}" diff --git a/man/make.conf.5 b/man/make.conf.5 index 168523efa..4f6a24c74 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -244,7 +244,7 @@ stored for later use by various debuggers. This feature is disabled by .TP .B strict Have portage react strongly to conditions that have the potential to be -dangerous (like missing or incorrect Manifests). +dangerous (like missing or incorrect digests for ebuilds or distfiles). .TP .B stricter Have portage react strongly to conditions that may conflict with system diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 01c677eb8..0e354d439 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -1637,6 +1637,10 @@ class config: 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) @@ -3232,12 +3236,12 @@ def prepare_build_dirs(myroot, mysettings, cleanup): "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 @@ -3254,11 +3258,10 @@ def prepare_build_dirs(myroot, mysettings, cleanup): 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, diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 75050ae4d..39a284561 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -48,7 +48,7 @@ class vardbapi(dbapi): 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, @@ -396,13 +396,16 @@ class vardbapi(dbapi): 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: