Tweak _eclasses_ logic inside action_metadata(). (trunk r13372)
authorZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:20:44 +0000 (07:20 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:20:44 +0000 (07:20 -0000)
svn path=/main/branches/2.1.6/; revision=13525

pym/_emerge/__init__.py

index df2efba4e991e2af7f468ab89cea27caa6012d1e..57adfdffeca52b16a241960ab35a4674639f4c82 100644 (file)
@@ -13381,12 +13381,12 @@ def action_metadata(settings, portdb, myopts, porttrees=None):
                                else:
                                        inherited = inherited.split()
 
-                               if inherited:
-                                       if tree_data.src_db.complete_eclass_entries and \
-                                               eclasses is None:
-                                               noise.corruption(cpv, "missing _eclasses_ field")
-                                               continue
+                               if tree_data.src_db.complete_eclass_entries and \
+                                       eclasses is None:
+                                       noise.corruption(cpv, "missing _eclasses_ field")
+                                       continue
 
+                               if inherited:
                                        # Even if _eclasses_ already exists, replace it with data from
                                        # eclass_cache, in order to insert local eclass paths.
                                        try:
@@ -13400,6 +13400,8 @@ def action_metadata(settings, portdb, myopts, porttrees=None):
                                                noise.eclass_stale(cpv)
                                                continue
                                        src['_eclasses_'] = eclasses
+                               else:
+                                       src['_eclasses_'] = {}
 
                                if not eapi_supported:
                                        src = {