self.already_in_regenerate = 0
def get_virts_p(self, myroot=None):
+
+ if myroot is not None:
+ warnings.warn("The 'myroot' parameter for " + \
+ "portage.config.get_virts_p() is deprecated",
+ DeprecationWarning, stacklevel=2)
+
if self.virts_p:
return self.virts_p
virts = self.getvirtuals()
def getvirtuals(self, myroot=None):
"""myroot is now ignored because, due to caching, it has always been
broken for all but the first call."""
+
+ if myroot is not None:
+ warnings.warn("The 'myroot' parameter for " + \
+ "portage.config.getvirtuals() is deprecated",
+ DeprecationWarning, stacklevel=2)
+
myroot = self["ROOT"]
if self.virtuals:
return self.virtuals
mysplit = versions._pkgsplit(myslash[-1])
if settings is None:
settings = globals()["settings"]
- virts = settings.getvirtuals("/")
- virts_p = settings.get_virts_p("/")
+ virts = settings.getvirtuals()
+ virts_p = settings.get_virts_p()
if len(myslash)>2:
# this is illegal case.
mysplit=[]
# gets virtual package settings
def getvirtuals(myroot):
+ """
+ Calls portage.settings.getvirtuals().
+ @deprecated: Use portage.settings.getvirtuals().
+ """
global settings
- writemsg("--- DEPRECATED call to getvirtual\n")
- return settings.getvirtuals(myroot)
+ warnings.warn("portage.getvirtuals() is deprecated",
+ DeprecationWarning, stacklevel=2)
+ return settings.getvirtuals()
def commit_mtimedb(mydict=None, filename=None):
if mydict is None: