portdb = trees["/"]["porttree"].dbapi
portdb.mysettings = repoman_settings
# dep_zapdeps looks at the vardbapi, but it shouldn't for repoman.
-trees["/"]["vartree"].dbapi = portage.fakedbapi(settings=repoman_settings)
+del trees["/"]["vartree"]
if not myreporoot:
myreporoot = os.path.basename(portdir_overlay)
other = []
# Alias the trees we'll be checking availability against
- vardb = trees[myroot]["vartree"].dbapi
+ vardb = None
+ if "vartree" in trees[myroot]:
+ vardb = trees[myroot]["vartree"].dbapi
if use_binaries:
mydbapi = trees[myroot]["bintree"].dbapi
else:
else:
atoms = [dep]
+ all_available = True
+ for atom in atoms:
+ if not mydbapi.match(atom):
+ all_available = False
+ break
+
+ if not vardb:
+ # called by repoman
+ preferred.append((atoms, None, all_available))
+ continue
+
""" The package names rather than the exact atoms are used for an
initial rough match against installed packages. More specific
preference selection is handled later via slot and version comparison."""
all_installed = False
break
- all_available = True
- for atom in atoms:
- if not mydbapi.match(atom):
- all_available = False
- break
-
# Check if the set of atoms will result in a downgrade of
# an installed package. If they will then don't prefer them
# over other atoms.