1 |
commit: a074dc39f5bef8285035b739671fc32910fff733 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 31 07:46:45 2011 +0000 |
4 |
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 31 07:46:45 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a074dc39 |
7 |
|
8 |
ebuild_xattr: lazily import xattr |
9 |
|
10 |
--- |
11 |
pym/portage/cache/ebuild_xattr.py | 6 ++++-- |
12 |
pym/portage/tests/lint/test_import_modules.py | 1 - |
13 |
2 files changed, 4 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/pym/portage/cache/ebuild_xattr.py b/pym/portage/cache/ebuild_xattr.py |
16 |
index e55ac3e..1d7e26f 100644 |
17 |
--- a/pym/portage/cache/ebuild_xattr.py |
18 |
+++ b/pym/portage/cache/ebuild_xattr.py |
19 |
@@ -1,17 +1,19 @@ |
20 |
-# Copyright: 2009-2010 Gentoo Foundation |
21 |
+# Copyright: 2009-2011 Gentoo Foundation |
22 |
# Author(s): Petteri Räty (betelgeuse@g.o) |
23 |
# License: GPL2 |
24 |
|
25 |
__all__ = ['database'] |
26 |
|
27 |
+import portage |
28 |
from portage.cache import fs_template |
29 |
from portage.versions import catsplit |
30 |
from portage import cpv_getkey |
31 |
from portage import os |
32 |
from portage import _encodings |
33 |
from portage import _unicode_decode |
34 |
-import xattr |
35 |
from errno import ENODATA,ENOSPC,E2BIG |
36 |
+portage.proxy.lazyimport.lazyimport(globals(), |
37 |
+ 'xattr') |
38 |
|
39 |
class NoValueException(Exception): |
40 |
pass |
41 |
|
42 |
diff --git a/pym/portage/tests/lint/test_import_modules.py b/pym/portage/tests/lint/test_import_modules.py |
43 |
index c0551c7..87bb4bf 100644 |
44 |
--- a/pym/portage/tests/lint/test_import_modules.py |
45 |
+++ b/pym/portage/tests/lint/test_import_modules.py |
46 |
@@ -11,7 +11,6 @@ class ImportModulesTestCase(TestCase): |
47 |
|
48 |
def testImportModules(self): |
49 |
expected_failures = frozenset(( |
50 |
- "portage.cache.ebuild_xattr", #automagic dep on xattr |
51 |
)) |
52 |
|
53 |
for mod in self._list_modules(PORTAGE_PYM_PATH): |