1 |
Author: zmedico |
2 |
Date: 2010-01-30 16:55:15 +0000 (Sat, 30 Jan 2010) |
3 |
New Revision: 15292 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/dbapi/porttree.py |
7 |
Log: |
8 |
Show a DeprecationWarning if the deprecated pordbapi constructor parameter |
9 |
is used incorrectly. |
10 |
|
11 |
|
12 |
Modified: main/trunk/pym/portage/dbapi/porttree.py |
13 |
=================================================================== |
14 |
--- main/trunk/pym/portage/dbapi/porttree.py 2010-01-30 15:50:06 UTC (rev 15291) |
15 |
+++ main/trunk/pym/portage/dbapi/porttree.py 2010-01-30 16:55:15 UTC (rev 15292) |
16 |
@@ -157,16 +157,17 @@ |
17 |
from portage import settings |
18 |
self.mysettings = config(clone=settings) |
19 |
|
20 |
- # enable this warning after this parameter is unused in stable portage |
21 |
- if False and _unused_param is not None: |
22 |
+ porttree_root = self.mysettings['PORTDIR'] |
23 |
+ |
24 |
+ # always show this warning after this parameter |
25 |
+ # is unused in stable portage |
26 |
+ if _unused_param is not None and _unused_param != porttree_root: |
27 |
warnings.warn("The first parameter of the " + \ |
28 |
"portage.dbapi.porttree.portdbapi" + \ |
29 |
" constructor is now unused. Use " + \ |
30 |
"mysettings['PORTDIR'] instead.", |
31 |
DeprecationWarning) |
32 |
|
33 |
- porttree_root = self.mysettings['PORTDIR'] |
34 |
- |
35 |
# This is strictly for use in aux_get() doebuild calls when metadata |
36 |
# is generated by the depend phase. It's safest to use a clone for |
37 |
# this purpose because doebuild makes many changes to the config |