dep_pkg, existing_node = self._select_package(dep.root, dep.atom,
onlydeps=dep.onlydeps)
if not dep_pkg:
+ if dep.priority.satisfied:
+ # This could be an unecessary build-time dep
+ # pulled in by --with-bdeps=y.
+ return 1
if allow_unsatisfied:
self._unsatisfied_deps.append(dep)
return 1
# discarded dependencies reduce the amount of information
# available for optimization of merge order.
if dep.priority.satisfied and \
+ not dep_pkg.installed and \
not (existing_node or empty or deep or update):
myarg = None
if dep.root == self.target_root:
atom_without_category, "null"))
cat, atom_pn = portage.catsplit(null_cp)
+ dbs = self._filtered_trees[root_config.root]["dbs"]
cp_set = set()
- for db, pkg_type, built, installed, db_keys in \
- self._filtered_trees[root_config.root]["dbs"]:
+ for db, pkg_type, built, installed, db_keys in dbs:
cp_set.update(db.cp_all())
for cp in list(cp_set):
cat, pn = portage.catsplit(cp)
cp_set.discard(cp)
deps = []
for cp in cp_set:
+ have_pkg = False
+ for db, pkg_type, built, installed, db_keys in dbs:
+ if db.cp_list(cp):
+ have_pkg = True
+ break
+ if not have_pkg:
+ continue
cat, pn = portage.catsplit(cp)
deps.append(insert_category_into_atom(
atom_without_category, cat))
else:
self._select_package = self._select_pkg_from_graph
self.myparams.add("selective")
+ # Always traverse deep dependencies in order to account for
+ # potentially unsatisfied dependencies of installed packages.
+ # This is necessary for correct --keep-going or --resume operation
+ # in case a package from a group of circularly dependent packages
+ # fails. In this case, a package which has recently been installed
+ # may have an unsatisfied circular dependency (pulled in by
+ # PDEPEND, for example). So, even though a package is already
+ # installed, it may not have all of it's dependencies satisfied, so
+ # it may not be usable. If such a package is in the subgraph of
+ # deep depenedencies of a scheduled build, that build needs to
+ # be cancelled. In order for this type of situation to be
+ # recognized, deep traversal of dependencies is required.
+ self.myparams.add("deep")
favorites = resume_data.get("favorites")
args_set = self._sets["args"]
ret_list = []
ret_ftype = []
for x in range(0, len(list)):
- if(ignorecvs and (len(list[x]) > 2) and (list[x][:2]!=".#")):
- ret_list.append(list[x])
- ret_ftype.append(ftype[x])
- elif (list[x] not in ignorelist):
+ if list[x] in ignorelist:
+ pass
+ elif ignorecvs:
+ if list[x][:2] != ".#":
+ ret_list.append(list[x])
+ ret_ftype.append(ftype[x])
+ else:
ret_list.append(list[x])
ret_ftype.append(ftype[x])
writemsg("cacheddirStats: H:%d/M:%d/S:%d\n" % (cacheHit, cacheMiss, cacheStale),10)
return ret_list, ret_ftype
+_ignorecvs_dirs = ('CVS', 'SCCS', '.svn', '.git')
+
def listdir(mypath, recursive=False, filesonly=False, ignorecvs=False, ignorelist=[], followSymlinks=True,
EmptyOnError=False, dirsonly=False):
"""
@type recursive: Boolean
@param filesonly; Only return files, not more directories
@type filesonly: Boolean
- @param ignorecvs: Ignore CVS directories ('CVS','.svn','SCCS')
+ @param ignorecvs: Ignore CVS directories ('CVS','SCCS','.svn','.git')
@type ignorecvs: Boolean
@param ignorelist: List of filenames/directories to exclude
@type ignorelist: List
if recursive:
x=0
while x<len(ftype):
- if ftype[x]==1 and not (ignorecvs and os.path.basename(list[x]) in ('CVS','.svn','SCCS')):
+ if ftype[x] == 1 and not \
+ (ignorecvs and os.path.basename(list[x]) in _ignorecvs_dirs):
l,f = cacheddir(mypath+"/"+list[x], ignorecvs, ignorelist, EmptyOnError,
followSymlinks)
def child_nodes(self, node, ignore_priority=None):
"""Return all children of the specified node"""
if ignore_priority is None:
- return self.nodes[node][0].keys()
+ return list(self.nodes[node][0])
children = []
for child, priority in self.nodes[node][0].iteritems():
if priority > ignore_priority:
children.append(child)
return children
- def parent_nodes(self, node):
+ def parent_nodes(self, node, ignore_priority=None):
"""Return all parents of the specified node"""
- return self.nodes[node][1].keys()
+ if ignore_priority is None:
+ return list(self.nodes[node][1])
+ parents = []
+ for parent, priority in self.nodes[node][1].iteritems():
+ if priority > ignore_priority:
+ parents.append(parent)
+ return parents
def leaf_nodes(self, ignore_priority=None):
"""Return all nodes that have no children