def __init__(self, arch, status, sub_path, tree_path):
self.arch = arch
self.status = status
- self.sub_path = normalize_path(sub_path.lstrip(os.sep))
+ if sub_path:
+ sub_path = normalize_path(sub_path.lstrip(os.sep))
+ self.sub_path = sub_path
self.tree_path = tree_path
- self.abs_path = os.path.join(tree_path, 'profiles', self.sub_path)
+ if tree_path:
+ self.abs_path = os.path.join(tree_path, 'profiles', self.sub_path)
+ else:
+ self.abs_path = tree_path
+
+ def __str__(self):
+ if self.sub_path:
+ return self.sub_path
+ return 'empty profile'
profile_list = []
valid_profile_types = frozenset(['dev', 'exp', 'stable'])
profile_sub_paths.add(prof.sub_path)
profiles.setdefault(prof.arch, []).append(prof)
+# Use an empty profile for checking dependencies of
+# packages that have empty KEYWORDS.
+prof = ProfileDesc('**', 'stable', '', '')
+profiles.setdefault(prof.arch, []).append(prof)
+
for x in repoman_settings.archlist():
if x[0] == "~":
continue
previous_keywords = slot_keywords.get(myaux["SLOT"])
if previous_keywords is None:
slot_keywords[myaux["SLOT"]] = set()
- elif not live_ebuild:
+ elif ebuild_archs and not live_ebuild:
dropped_keywords = previous_keywords.difference(ebuild_archs)
if dropped_keywords:
stats["KEYWORDS.dropped"] += 1
else:
arches.append([keyword, keyword, [keyword]])
allmasked = False
+ if not arches:
+ # Use an empty profile for checking dependencies of
+ # packages that have empty KEYWORDS.
+ arches.append(['**', '**', ['**']])
baddepsyntax = False
badlicsyntax = False
# just in case, prevent config.reset() from nuking these.
dep_settings.backup_changes("ACCEPT_KEYWORDS")
- for prov_cp in provide_cps:
- if prov_cp not in dep_settings.getvirtuals():
- stats["virtual.unavailable"]+=1
- fails["virtual.unavailable"].append("%s: %s(%s) %s" % \
- (relative_path, keyword, prof.sub_path, prov_cp))
+ if prof.sub_path:
+ # old-style virtuals currently aren't
+ # resolvable with empty profile, since
+ # mappings from 'virtuals' files are
+ # unavailable (it would be expensive to
+ # search for PROVIDE in all ebuilds)
+ for prov_cp in provide_cps:
+ if prov_cp not in dep_settings.getvirtuals():
+ stats["virtual.unavailable"] += 1
+ fails["virtual.unavailable"].append(
+ "%s: %s(%s) %s" % (relative_path, keyword,
+ prof.sub_path, prov_cp))
if not baddepsyntax:
- ismasked = os.path.join(catdir, y) not in \
- portdb.xmatch("list-visible", x)
+ ismasked = not ebuild_archs or \
+ pkg.cp not in portdb.xmatch("list-visible", x)
if ismasked:
if not have_pmasked:
have_pmasked = bool(dep_settings._getMaskAtom(
if success:
if atoms:
+
+ if not prof.sub_path:
+ # old-style virtuals currently aren't
+ # resolvable with empty profile, since
+ # 'virtuals' mappings are unavailable
+ # (it would be expensive to search
+ # for PROVIDE in all ebuilds)
+ atoms = [atom for atom in atoms if not \
+ (atom.cp.startswith('virtual/') and \
+ not portdb.cp_list(atom.cp))]
+
#we have some unsolvable deps
#remove ! deps, which always show up as unsatisfiable
atoms = [str(atom.unevaluated_atom) \
for atom in atoms if not atom.blocker]
+
#if we emptied out our list, continue:
if not atoms:
continue
stats[mykey]=stats[mykey]+1
fails[mykey].append("%s: %s(%s) %s" % \
(relative_path, keyword,
- prof.sub_path, repr(atoms)))
+ prof, repr(atoms)))
else:
stats[mykey]=stats[mykey]+1
fails[mykey].append("%s: %s(%s) %s" % \
(relative_path, keyword,
- prof.sub_path, repr(atoms)))
+ prof, repr(atoms)))
# Check for 'all unstable' or 'all masked' -- ACCEPT_KEYWORDS is stripped
# XXX -- Needs to be implemented in dep code. Can't determine ~arch nicely.