[paludis-commits] r4542 - in trunk: . paludis
dleverton at svn.pioto.org
dleverton at svn.pioto.org
Fri Apr 4 09:40:07 UTC 2008
Author: dleverton
Date: 2008-04-04 09:40:05 +0000 (Fri, 04 Apr 2008)
New Revision: 4542
Modified:
trunk/ChangeLog
trunk/paludis/hooker.cc
Log:
Don't barf when a hook has been removed.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-04-02 19:29:08 UTC (rev 4541)
+++ trunk/ChangeLog 2008-04-04 09:40:05 UTC (rev 4542)
@@ -5,6 +5,10 @@
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-04 David Leverton
+
+ * paludis/: Don't barf when a hook has been removed.
+
2008-04-02 David Leverton
* paludis/repositories/e/: Handle broken profiles more gracefully
Modified: trunk/paludis/hooker.cc
===================================================================
--- trunk/paludis/hooker.cc 2008-04-02 19:29:08 UTC (rev 4541)
+++ trunk/paludis/hooker.cc 2008-04-04 09:40:05 UTC (rev 4542)
@@ -753,13 +753,24 @@
case hod_stdout:
for (Sequence<tr1::shared_ptr<HookFile> >::ConstIterator f(h->second->begin()),
f_end(h->second->end()) ; f != f_end ; ++f)
- result.max_exit_status = std::max(result.max_exit_status, (*f)->run(hook).max_exit_status);
+ if ((*f)->file_name().is_regular_file_or_symlink_to_regular_file())
+ result.max_exit_status = std::max(result.max_exit_status, (*f)->run(hook).max_exit_status);
+ else
+ Log::get_instance()->message(ll_warning, lc_context, "Hook file '" +
+ stringify((*f)->file_name()) + "' is not a regular file or has been removed");
continue;
case hod_grab:
for (Sequence<tr1::shared_ptr<HookFile> >::ConstIterator f(h->second->begin()),
f_end(h->second->end()) ; f != f_end ; ++f)
{
+ if (! (*f)->file_name().is_regular_file_or_symlink_to_regular_file())
+ {
+ Log::get_instance()->message(ll_warning, lc_context, "Hook file '" +
+ stringify((*f)->file_name()) + "' is not a regular file or has been removed");
+ continue;
+ }
+
HookResult tmp((*f)->run(hook));
if (tmp > result)
result = tmp;
More information about the paludis-commits
mailing list