1 |
Author: genone |
2 |
Date: 2008-02-28 13:57:04 +0000 (Thu, 28 Feb 2008) |
3 |
New Revision: 475 |
4 |
|
5 |
Modified: |
6 |
trunk/src/equery/equery |
7 |
trunk/src/gentoolkit/helpers.py |
8 |
trunk/src/glsa-check/glsa-check |
9 |
Log: |
10 |
fix imports for portage-2.2 |
11 |
|
12 |
Modified: trunk/src/equery/equery |
13 |
=================================================================== |
14 |
--- trunk/src/equery/equery 2008-02-21 14:16:14 UTC (rev 474) |
15 |
+++ trunk/src/equery/equery 2008-02-28 13:57:04 UTC (rev 475) |
16 |
@@ -28,9 +28,14 @@ |
17 |
except ImportError: |
18 |
sys.path.insert(0, "/usr/lib/portage/pym") |
19 |
import portage |
20 |
-import portage_checksum |
21 |
-from portage_util import unique_array |
22 |
|
23 |
+try: |
24 |
+ import portage.checksum as checksum |
25 |
+ from portage.util import unique_array |
26 |
+except ImportError: |
27 |
+ import portage_checksum as checksum |
28 |
+ from portage_util import unique_array |
29 |
+ |
30 |
import gentoolkit.pprinter as pp |
31 |
from gentoolkit.pprinter import print_info, print_error, print_warn, die |
32 |
|
33 |
@@ -924,7 +929,7 @@ |
34 |
return (query, opts) |
35 |
|
36 |
def getMD5sum(self, file): |
37 |
- return portage_checksum.perform_md5(file, calc_prelink=1) |
38 |
+ return checksum.perform_md5(file, calc_prelink=1) |
39 |
|
40 |
def perform(self, args): |
41 |
(query, opts) = self.parseArgs(args) |
42 |
|
43 |
Modified: trunk/src/gentoolkit/helpers.py |
44 |
=================================================================== |
45 |
--- trunk/src/gentoolkit/helpers.py 2008-02-21 14:16:14 UTC (rev 474) |
46 |
+++ trunk/src/gentoolkit/helpers.py 2008-02-28 13:57:04 UTC (rev 475) |
47 |
@@ -10,7 +10,10 @@ |
48 |
import portage |
49 |
from gentoolkit import * |
50 |
from package import * |
51 |
-from portage_util import unique_array |
52 |
+try: |
53 |
+ from portage.util import unique_array |
54 |
+except ImportError: |
55 |
+ from portage_util import unique_array |
56 |
|
57 |
def find_packages(search_key, masked=False): |
58 |
"""Returns a list of Package objects that matched the search key.""" |
59 |
|
60 |
Modified: trunk/src/glsa-check/glsa-check |
61 |
=================================================================== |
62 |
--- trunk/src/glsa-check/glsa-check 2008-02-21 14:16:14 UTC (rev 474) |
63 |
+++ trunk/src/glsa-check/glsa-check 2008-02-28 13:57:04 UTC (rev 475) |
64 |
@@ -306,7 +306,12 @@ |
65 |
|
66 |
# mail mode as requested by solar |
67 |
if mode == "mail": |
68 |
- import portage_mail, socket |
69 |
+ try: |
70 |
+ import portage.mail as portage_mail |
71 |
+ except ImportError: |
72 |
+ import portage_mail |
73 |
+ |
74 |
+ import socket |
75 |
from StringIO import StringIO |
76 |
from email.mime.text import MIMEText |
77 |
|
78 |
|
79 |
-- |
80 |
gentoo-commits@l.g.o mailing list |