Merged from trunk 5366:5372
authorFabian Groffen <grobian@gentoo.org>
Sun, 24 Dec 2006 10:04:14 +0000 (10:04 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 24 Dec 2006 10:04:14 +0000 (10:04 -0000)
For bug #158931, add some release notes to explain performance penalties for
dependency calculations.

For forward compatibility, make metadata_overlay pass any additional positional
and keyword parameters into the super constructor.

Manpage fix for bug # 158983, thanks to Fabio Correa for the patch (WarnerBro)

More code cleanup, packagetree appears to be completely unused, so lets remove
it in favor of inheriting from object (WarnerBro)

Docstrings for doebuild (WarnerBro)

cptot appears to be unused, punting it along with this commented out function,
it appears to be unused as well. (WarnerBro)

svn path=/main/branches/prefix/; revision=5375

NEWS
RELEASE-NOTES
man/emerge.1
pym/cache/metadata_overlay.py
pym/portage.py

diff --git a/NEWS b/NEWS
index 9e466b55054c2c949b507a9348f232ccb7aed957..6d369961e493efa02246379b40bd687e27fd8acf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@ portage-2.1.2
 * Dependencies can be satisfied by installed packages that do not have matching
   ebuilds in the portage tree or overlay.
 * Emerge automatically ignores blockers that are made irrelevant by an upgrade.
+* Emerge supports "reverse blocker detection" which means that the blockers of
+  installed packages will always be respected.
 * Emerge builds a complete dependency graph in order to ensure correct merge
   order and detection of circular dependencies.
 * The world and system sets allow automatic update of all installed slots.
index c15f922bafd16f995af4cce4951f2eed9819aaa9..26d95a9cdf226b67930bca171a3ad172470ec686 100644 (file)
@@ -4,6 +4,12 @@ Features/major bugfixes are listed in NEWS
 portage-2.1.2
 ==================================
 
+* Depending on the number of packages installed, users may notice a difference
+  in the time taken for dependency calculations.  This performance penalty is
+  due to the addition of important new features which include the ability to
+  detect reverse blockers, the building of a complete dependency graph, and the
+  ability to use installed packages to satisify dependencies even after their
+  ebuilds have been removed from the portage tree.
 * emerge does not necessarily update build time dependencies that are not
   strictly required.  See the --with-bdeps option in the emerge(1) man page.
 
index f2bb05cc4a4b444295e96add3e5e7db3af6681e9..61a3bfeea6eddd043627d801ca542cdcb9b20471 100644 (file)
@@ -81,7 +81,7 @@ later updating.
 Cleans the system by removing packages that will not affect the
 functionality of the system.  The arguments can be \fIebuilds\fR,
 \fIsets\fR, or \fIdependencies\fR.  For example, \fBemerge
-clean binutils\fR cleans out old versions of binutils;
+--clean binutils\fR cleans out old versions of binutils;
 \fBemerge \-\-clean net\-www/mozilla\-0.9.9\-r2\fR cleans out that
 specific version of Mozilla.  This is generally safe to use.
 \fBNote that\fR \-\-clean \fBdoes not remove unslotted packages.\fR
index 91066fb9ce028794c869248869a811f431e44170..33d39d2aeced39ce9b101e990b75aa6c7cf0bc10 100644 (file)
@@ -14,8 +14,12 @@ class database(template.database):
 
        serialize_eclasses = False
 
-       def __init__(self, location, label, auxdbkeys, **config):
-               super(database, self).__init__(location, label, auxdbkeys)
+       def __init__(self, location, label, auxdbkeys, db_rw=db_rw, db_ro=db_ro,
+               *args, **config):
+               super_config = config.copy()
+               super_config.pop("gid", None)
+               super(database, self).__init__(location, label, auxdbkeys,
+                       *args, **super_config)
                self.db_rw = db_rw(location, label, auxdbkeys, **config)
                self.commit = self.db_rw.commit
                self.autocommits = self.db_rw.autocommits
index 9d729fce14afd000134923c8575764c3dbdd8549..17df76f59e9052961cb801530b79b8de14eb9389 100644 (file)
@@ -3123,6 +3123,54 @@ _doebuild_manifest_checked = None
 def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
        fetchonly=0, cleanup=0, dbkey=None, use_cache=1, fetchall=0, tree=None,
        mydbapi=None, vartree=None, prev_mtimes=None):
+       
+       """
+       Wrapper function that invokes specific ebuild phases through the spawning
+       of ebuild.sh
+       
+       @param myebuild: name of the ebuild to invoke the phase on (CPV)
+       @type myebuild: String
+       @param mydo: Phase to run
+       @type mydo: String
+       @param myroot: $ROOT (usually '/', see man make.conf)
+       @type myroot: String
+       @param mysettings: Portage Configuration
+       @type mysettings: instance of portage.config
+       @param debug: Turns on various debug information (eg, debug for spawn)
+       @type debug: Boolean
+       @param listonly: Used to wrap fetch(); passed such that fetch only lists files required.
+       @type listonly: Boolean
+       @param fetchonly: Used to wrap fetch(); passed such that files are only fetched (no other actions)
+       @type fetchonly: Boolean
+       @param cleanup: Passed to prepare_build_dirs (TODO: what does it do?)
+       @type cleanup: Boolean
+       @param dbkey: A dict (usually keys and values from the depend phase, such as KEYWORDS, USE, etc..)
+       @type dbkey: Dict or String
+       @param use_cache: Enables the cache
+       @type use_cache: Boolean
+       @param fetchall: Used to wrap fetch(), fetches all URI's (even ones invalid due to USE conditionals)
+       @type fetchall: Boolean
+       @param tree: Which tree to use ('vartree','porttree','bintree', etc..), defaults to 'porttree'
+       @type tree: String
+       @param mydbapi: a dbapi instance to pass to various functions; this should be a portdbapi instance.
+       @type mydbapi: portdbapi instance
+       @param vartree: A instance of vartree; used for aux_get calls, defaults to db[myroot]['vartree']
+       @type vartree: vartree instance
+       @param prev_mtimes: A dict of { filename:mtime } keys used by merge() to do config_protection
+       @type prev_mtimes: dictionary
+       @rtype: Boolean
+       @returns:
+       1. 0 for success
+       2. 1 for error
+       
+       Most errors have an accompanying error message.
+       
+       listonly and fetchonly are only really necessary for operations involving 'fetch'
+       prev_mtimes are only necessary for merge operations.
+       Other variables may not be strictly required, many have defaults that are set inside of doebuild.
+       
+       """
+       
        if not tree:
                writemsg("Warning: tree not specified to doebuild\n")
                tree = "porttree"
@@ -4357,41 +4405,6 @@ def getmaskingstatus(mycpv, settings=None, portdb=None):
                rValue.append(kmask+" keyword")
        return rValue
 
-class packagetree:
-       def __init__(self,virtual,clone=None):
-               if clone:
-                       self.tree=clone.tree.copy()
-                       self.populated=clone.populated
-                       self.virtual=clone.virtual
-                       self.dbapi=None
-               else:
-                       self.tree={}
-                       self.populated=0
-                       self.virtual=virtual
-                       self.dbapi=None
-
-       def resolve_key(self,mykey):
-               return key_expand(mykey, mydb=self.dbapi, settings=self.settings)
-
-       def dep_nomatch(self,mypkgdep):
-               mykey=dep_getkey(mypkgdep)
-               nolist=self.dbapi.cp_list(mykey)
-               mymatch=self.dbapi.match(mypkgdep)
-               if not mymatch:
-                       return nolist
-               for x in mymatch:
-                       if x in nolist:
-                               nolist.remove(x)
-               return nolist
-
-       def depcheck(self,mycheck,use="yes",myusesplit=None):
-               return dep_check(mycheck,self.dbapi,use=use,myuse=myusesplit)
-
-       def populate(self):
-               "populates the tree with values"
-               populated=1
-               pass
-
 class portagetree:
        def __init__(self, root="/", virtual=None, clone=None, settings=None):
 
@@ -4579,16 +4592,6 @@ class fakedbapi(dbapi):
                if not mycpv in self.cpdict[mycp]:
                        self.cpdict[mycp].append(mycpv)
 
-       #def cpv_virtual(self,oldcpv,newcpv):
-       #       """Maps a cpv to the list of available packages."""
-       #       mycp=cpv_getkey(newcpv)
-       #       self.cpvdict[newcpv]=1
-       #       if not self.virtdict.has_key(mycp):
-       #               self.virtdict[mycp]=[]
-       #       if not mycpv in self.virtdict[mycp]:
-       #               self.virtdict[mycp].append(oldcpv)
-       #       cpv_remove(oldcpv)
-
        def cpv_remove(self,mycpv):
                """Removes a cpv from the list of available packages."""
                self._clear_cache()
@@ -4676,7 +4679,6 @@ class bindbapi(fakedbapi):
                        self.bintree.populate()
                return fakedbapi.cpv_all(self)
 
-cptot=0
 class vardbapi(dbapi):
        def __init__(self, root, categories=None, settings=None, vartree=None):
                self.root       = root[:]
@@ -5063,7 +5065,7 @@ class vardbapi(dbapi):
                        write_atomic(cpath, str(counter))
                return counter
 
-class vartree(packagetree):
+class vartree(object):
        "this tree will scan a var/db/pkg database located at root (passed to init)"
        def __init__(self, root="/", virtual=None, clone=None, categories=None,
                settings=None):
@@ -5861,7 +5863,7 @@ class portdbapi(dbapi):
                                newlist.append(mycpv)
                return newlist
 
-class binarytree(packagetree):
+class binarytree(object):
        "this tree scans for a list of all packages available in PKGDIR"
        def __init__(self, root, pkgdir, virtual=None, settings=None, clone=None):
                if clone: