aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-05 15:54:30 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-05 15:42:30 +0000
commitf172211e73226dd52a7fd574de4efbb2d798133b (patch)
tree83451d723cdbbfedd5aa9b65474230e7a1123a55
parent53a91d350edc930f20aadac42c2c848cb3c2a5a8 (diff)
downloadpaludis-f172211e73226dd52a7fd574de4efbb2d798133b.tar.gz
paludis-f172211e73226dd52a7fd574de4efbb2d798133b.tar.xz
Skip uninstall phases if possible too
-rw-r--r--paludis/repositories/e/can_skip_phase.cc11
-rw-r--r--paludis/repositories/e/eapis/0.conf6
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf8
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf8
4 files changed, 20 insertions, 13 deletions
diff --git a/paludis/repositories/e/can_skip_phase.cc b/paludis/repositories/e/can_skip_phase.cc
index e82907a..0309d56 100644
--- a/paludis/repositories/e/can_skip_phase.cc
+++ b/paludis/repositories/e/can_skip_phase.cc
@@ -20,7 +20,9 @@
#include <paludis/repositories/e/can_skip_phase.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
+#include <paludis/util/tokeniser.hh>
#include <paludis/metadata_key.hh>
+#include <set>
using namespace paludis;
using namespace paludis::erepository;
@@ -36,8 +38,13 @@ paludis::erepository::can_skip_phase(const std::tr1::shared_ptr<const ERepositor
if (skipifno.empty())
return false;
- if (id->defined_phases_key()->value()->end() != id->defined_phases_key()->value()->find(skipifno))
- return false;
+ std::set<std::string> skip_if_no_values;
+ tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(skipifno, ",", "", inserter(skip_if_no_values, skip_if_no_values.begin()));
+
+ for (std::set<std::string>::const_iterator i(skip_if_no_values.begin()), i_end(skip_if_no_values.end()) ;
+ i != i_end ; ++i)
+ if (id->defined_phases_key()->value()->end() != id->defined_phases_key()->value()->find(*i))
+ return false;
return true;
}
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index 389f6ce..8d93d38 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -114,10 +114,10 @@ ebuild_install = \
: tidyup
ebuild_uninstall = \
- : killoldrm ; \
- : initrm prerm saveenv ; \
+ skipifno=prerm,postrm : killoldrm ; \
+ skipifno=prerm,postrm : initrm prerm saveenv ; \
unmerge : ; \
- : loadenv postrm tidyuprm ;
+ skipifno=prerm,postrm : loadenv postrm tidyuprm ;
ebuild_pretend =
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index 743ea7b..385b257 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -117,11 +117,11 @@ ebuild_install = \
: tidyup
ebuild_uninstall = \
- : killoldrm ; \
- sandbox : initrm prerm saveenv ; \
+ skipifno=prerm,postrm : killoldrm ; \
+ skipifno=prerm,postrm sandbox : initrm prerm saveenv ; \
unmerge : ; \
- sandbox : loadenv postrm ; \
- : tidyuprm
+ skipifno=prerm,postrm sandbox : loadenv postrm ; \
+ skipifno=prerm,postrm : tidyuprm
ebuild_pretend = \
skipifno=pretend sandbox userpriv : pretend
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index be0e4ab..a48aa31 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -116,11 +116,11 @@ ebuild_install = \
: tidyup
ebuild_uninstall = \
- : killoldrm ; \
- sandbox : initrm prerm saveenv ; \
+ skipifno=prerm,postrm : killoldrm ; \
+ skipifno=prerm,postrm sandbox : initrm prerm saveenv ; \
unmerge : ; \
- sandbox : loadenv postrm ; \
- : tidyuprm
+ skipifno=prerm,postrm sandbox : loadenv postrm ; \
+ skipifno=prerm,postrm : tidyuprm
ebuild_pretend = \
skipifno=pretend sandbox userpriv : pretend