Tweak _eclasses_ logic inside action_metadata().
authorZac Medico <zmedico@gentoo.org>
Sun, 19 Apr 2009 18:57:58 +0000 (18:57 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 19 Apr 2009 18:57:58 +0000 (18:57 -0000)
svn path=/main/trunk/; revision=13372

pym/_emerge/__init__.py

index 92f2dbae07da805cda8ba42fe6774a3408eb5514..6c85112e0d1202426d9fa2b1e15ff7a262e5bbbe 100644 (file)
@@ -13557,12 +13557,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:
@@ -13576,6 +13576,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 = {