* [gentoo-commits] portage r15292 - main/trunk/pym/portage/dbapi
@ 2010-01-30 16:55 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2010-01-30 16:55 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2010-01-30 16:55:15 +0000 (Sat, 30 Jan 2010)
New Revision: 15292
Modified:
main/trunk/pym/portage/dbapi/porttree.py
Log:
Show a DeprecationWarning if the deprecated pordbapi constructor parameter
is used incorrectly.
Modified: main/trunk/pym/portage/dbapi/porttree.py
===================================================================
--- main/trunk/pym/portage/dbapi/porttree.py 2010-01-30 15:50:06 UTC (rev 15291)
+++ main/trunk/pym/portage/dbapi/porttree.py 2010-01-30 16:55:15 UTC (rev 15292)
@@ -157,16 +157,17 @@
from portage import settings
self.mysettings = config(clone=settings)
- # enable this warning after this parameter is unused in stable portage
- if False and _unused_param is not None:
+ porttree_root = self.mysettings['PORTDIR']
+
+ # always show this warning after this parameter
+ # is unused in stable portage
+ if _unused_param is not None and _unused_param != porttree_root:
warnings.warn("The first parameter of the " + \
"portage.dbapi.porttree.portdbapi" + \
" constructor is now unused. Use " + \
"mysettings['PORTDIR'] instead.",
DeprecationWarning)
- porttree_root = self.mysettings['PORTDIR']
-
# This is strictly for use in aux_get() doebuild calls when metadata
# is generated by the depend phase. It's safest to use a clone for
# this purpose because doebuild makes many changes to the config
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-30 16:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-30 16:55 [gentoo-commits] portage r15292 - main/trunk/pym/portage/dbapi Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox