Wrap portage.data.lchown() for unicode support in python-2.x.
authorZac Medico <zmedico@gentoo.org>
Tue, 11 Aug 2009 22:05:11 +0000 (22:05 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 11 Aug 2009 22:05:11 +0000 (22:05 -0000)
svn path=/main/trunk/; revision=14001

pym/portage/__init__.py
pym/portage/data.py

index c15366d934ac6501528bac0b14b74eaf23a44ac0..2325297b43fbc55b617c771254b7251e0bc2e584 100644 (file)
@@ -61,6 +61,9 @@ try:
                'portage.checksum',
                'portage.checksum:perform_checksum,perform_md5,prelink_capable',
                'portage.cvstree',
+               'portage.data',
+               'portage.data:lchown,ostype,portage_gid,portage_uid,secpass,' + \
+                       'uid,userland,userpriv_groups,wheelgid',
                'portage.dep',
                'portage.dep:best_match_to_list,dep_getcpv,dep_getkey,' + \
                        'get_operator,isjustname,isspecific,isvalidatom,' + \
@@ -101,8 +104,6 @@ try:
                INVALID_ENV_FILE, CUSTOM_MIRRORS_FILE, CONFIG_MEMORY_FILE,\
                INCREMENTALS, EAPI, MISC_SH_BINARY, REPO_NAME_LOC, REPO_NAME_FILE
 
-       from portage.data import ostype, lchown, userland, secpass, uid, wheelgid, \
-                                portage_uid, portage_gid, userpriv_groups
        from portage.manifest import Manifest
        import portage.exception
        from portage.localization import _
index 3ae286b34235d3462aeb4ed5a9652cf31da0a0da..d87387bdc7b49c86d416d0b2bf873f62d8ba60d5 100644 (file)
@@ -35,6 +35,9 @@ if not lchown:
                                        " exist.  Please rebuild python.\n", noiselevel=-1)
                        lchown()
 
+if sys.hexversion < 0x3000000:
+       lchown = portage._unicode_func_wrapper(lchown)
+
 def portage_group_warning():
        warn_prefix = colorize("BAD", "*** WARNING ***  ")
        mylines = [