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