[paludis-commits] r4583 - in trunk: . paludis/repositories/e

dleverton at svn.pioto.org dleverton at svn.pioto.org
Sun Apr 20 00:25:06 UTC 2008


Author: dleverton
Date: 2008-04-20 00:25:05 +0000 (Sun, 20 Apr 2008)
New Revision: 4583

Modified:
   trunk/ChangeLog
   trunk/paludis/repositories/e/e_key.cc
Log:
Make malformed USE in VDB a warning rather than an error (again).


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-04-17 18:25:28 UTC (rev 4582)
+++ trunk/ChangeLog	2008-04-20 00:25:05 UTC (rev 4583)
@@ -5,6 +5,11 @@
 only listed in SVN log. For a summary of what has changed between releases,
 see the NEWS file. This file is occasionally pruned to ChangeLog.old.bz2.
 
+2008-04-19 David Leverton
+
+	* paludis/repositories/e/: Make malformed USE in VDB a warning
+	rather than an error (again).
+
 2008-04-17 David Leverton
 
 	* paludis/, paludis/util/: Fix inquisitio.

Modified: trunk/paludis/repositories/e/e_key.cc
===================================================================
--- trunk/paludis/repositories/e/e_key.cc	2008-04-17 18:25:28 UTC (rev 4582)
+++ trunk/paludis/repositories/e/e_key.cc	2008-04-20 00:25:05 UTC (rev 4583)
@@ -872,10 +872,23 @@
     Context context("When parsing metadata key '" + raw_name() + "' from '" + stringify(*_imp->id) + "':");
     std::list<std::string> tokens;
     tokenise_whitespace(_imp->string_value, std::back_inserter(tokens));
-    for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
-            t != t_end ; ++t)
-        if ('-' != t->at(0))
-            _imp->value->insert(UseFlagName(*t));
+    try
+    {
+        for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
+                t != t_end ; ++t)
+            if ('-' != t->at(0))
+                _imp->value->insert(UseFlagName(*t));
+    }
+    catch (const InternalError &)
+    {
+        throw;
+    }
+    catch (const Exception & e)
+    {
+        Log::get_instance()->message("e.use.malformed", ll_warning, lc_context) << "Error loading " << raw_name() << " for '" << *_imp->id << "' due to exception '"
+                << e.message() << "' (" << e.what() << "), pretending " << raw_name() << " is empty for this package";
+    }
+
     return _imp->value;
 }
 



More information about the paludis-commits mailing list