aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-23 21:33:12 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-23 21:33:12 +0100
commit4d290362c1367806e3bbbff74fb12f1a8956f281 (patch)
tree3e0a3fcb7f31f834b74343b91026e7aacf52acc0
parent8dee117a5679f5c068c6e68d7d0306bf9570611f (diff)
downloadpaludis-4d290362c1367806e3bbbff74fb12f1a8956f281.tar.gz
paludis-4d290362c1367806e3bbbff74fb12f1a8956f281.tar.xz
Make pkg_pretend and resume command interact sanely.
Previously Paludis would run PretendAction for supporting IDs even if they had already been handled. Now we use the same logic used for InstallAction for pretends too. Fixes: ticket:604.
-rw-r--r--NEWS1
-rw-r--r--paludis/install_task.cc5
2 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 277cb1d..a1018a8 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ trunk/:
There are no longer bogus 'use flags defined recursively' messages
(ticket:568). Symlink rewriting now works when builddir contains symlinks
(ticket:571). The dreaded Ruby bindings segfaults are fixed (ticket:558).
+ pkg_pretend now behaves correctly with resumes (ticket:604).
* New Selection + Filter + Generator interface using Environment, replacing
the old PackageDatabase Query (ticket:559).
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index db2f756..0f6921c 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -588,6 +588,10 @@ InstallTask::_pretend()
SupportsActionTest<PretendAction> pretend_action_query;
for (DepList::Iterator dep(_imp->dep_list.begin()), dep_end(_imp->dep_list.end()) ;
dep != dep_end ; ++dep)
+ {
+ if ((dlk_package != dep->kind) || already_done(*dep))
+ continue;
+
if (dep->package_id->supports_action(pretend_action_query))
{
on_pretend_pre(*dep);
@@ -602,6 +606,7 @@ InstallTask::_pretend()
on_pretend_post(*dep);
}
+ }
on_pretend_all_post();