Merged from trunk 6353:6362
authorFabian Groffen <grobian@gentoo.org>
Tue, 10 Apr 2007 15:47:43 +0000 (15:47 -0000)
committerFabian Groffen <grobian@gentoo.org>
Tue, 10 Apr 2007 15:47:43 +0000 (15:47 -0000)
   +------------------------------------------------------------------------+
   | 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ò <flameeyes@gmail.com> 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

bin/prepman
man/make.conf.5
pym/portage/__init__.py
pym/portage/dbapi/vartree.py

index 8588b8d25d0e9191ca0898845540950c7b608889..2f694ec26fce327bdb42a87a1a8f6b6295ebff7f 100755 (executable)
@@ -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}}"
index 168523efa3955238c6ea607e4c668bcf1795d1e9..4f6a24c741fa37cfb54d3432bd83d8dcce177b51 100644 (file)
@@ -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
index 01c677eb868e000145b07f98e488321a9e1f4bf4..0e354d43915aa9a92fba269ecb4d79bf5ca46afa 100644 (file)
@@ -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,
index 75050ae4dbd56b738f5cfe529a7315b1a66f164a..39a2845619951449e0c57bbc438eb0abc3801885 100644 (file)
@@ -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: