aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-31 05:04:12 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-31 05:04:12 +0000
commita221f18987d6981b85f060390e5b36502ae9468a (patch)
tree2aa4f1c7ed47eb5f28ead5512fd1d46acd1fd52b /src
parentc88f7a39a906db747a42c9d9f4ca0cda7c9bbb01 (diff)
downloadpaludis-a221f18987d6981b85f060390e5b36502ae9468a.tar.gz
paludis-a221f18987d6981b85f060390e5b36502ae9468a.tar.xz
Ebuild definable call sequences. Fixes: ticket:264
Diffstat (limited to 'src')
-rw-r--r--src/clients/adjutrix/find_insecure_packages.cc1
-rw-r--r--src/clients/contrarius/install.cc2
-rw-r--r--src/clients/paludis/applets.cc4
-rw-r--r--src/clients/paludis/install.cc2
-rwxr-xr-xsrc/clients/paludis/upgrade_TEST16
-rwxr-xr-xsrc/clients/paludis/upgrade_TEST_setup.sh6
-rw-r--r--src/output/console_install_task.cc21
-rw-r--r--src/output/console_query_task.cc2
-rw-r--r--src/output/console_query_task.hh1
9 files changed, 33 insertions, 22 deletions
diff --git a/src/clients/adjutrix/find_insecure_packages.cc b/src/clients/adjutrix/find_insecure_packages.cc
index 077590bed..ea77f288d 100644
--- a/src/clients/adjutrix/find_insecure_packages.cc
+++ b/src/clients/adjutrix/find_insecure_packages.cc
@@ -23,6 +23,7 @@
#include <paludis/util/tokeniser.hh>
#include <paludis/query.hh>
#include <paludis/dep_spec.hh>
+#include <paludis/dep_tag.hh>
#include <paludis/package_database.hh>
#include <paludis/util/visitor-impl.hh>
diff --git a/src/clients/contrarius/install.cc b/src/clients/contrarius/install.cc
index 8b834f58b..e05fe3968 100644
--- a/src/clients/contrarius/install.cc
+++ b/src/clients/contrarius/install.cc
@@ -331,7 +331,7 @@ do_install(tr1::shared_ptr<Environment> env, std::string spec_str)
std::string eapi_str(env->
package_database()->fetch_repository(
pp->repository)->version_metadata(
- pp->name, pp->version)->eapi.name);
+ pp->name, pp->version)->eapi->name);
cerr << " ( " << colour(cl_masked, eapi_str) << " )";
}
diff --git a/src/clients/paludis/applets.cc b/src/clients/paludis/applets.cc
index 3bf22fd2c..1ca271e13 100644
--- a/src/clients/paludis/applets.cc
+++ b/src/clients/paludis/applets.cc
@@ -80,11 +80,11 @@ int do_best_version(tr1::shared_ptr<Environment> env)
Log::get_instance()->message(ll_qa, lc_context, "best-version of '" + query +
"' resolves to '" + stringify(*entries->last()) + "', which is a virtual for '"
- + stringify(metadata->virtual_interface->virtual_for) + "'. This will break with "
+ + stringify(*metadata->virtual_interface->virtual_for) + "'. This will break with "
"new style virtuals.");
tr1::shared_ptr<PackageDatabaseEntryCollection> new_entries(
new PackageDatabaseEntryCollection::Concrete);
- new_entries->push_back(metadata->virtual_interface->virtual_for);
+ new_entries->push_back(*metadata->virtual_interface->virtual_for);
entries = new_entries;
}
diff --git a/src/clients/paludis/install.cc b/src/clients/paludis/install.cc
index aa3653d85..5e1eb1404 100644
--- a/src/clients/paludis/install.cc
+++ b/src/clients/paludis/install.cc
@@ -645,7 +645,7 @@ do_install(tr1::shared_ptr<Environment> env)
{
std::string eapi_str(env->package_database()->fetch_repository(
pp->repository)->version_metadata(
- pp->name, pp->version)->eapi.name);
+ pp->name, pp->version)->eapi->name);
if (eapi_str == "UNKNOWN")
cerr << " ( " << colour(cl_masked, eapi_str) <<
diff --git a/src/clients/paludis/upgrade_TEST b/src/clients/paludis/upgrade_TEST
index 1d471d351..3de7ff840 100755
--- a/src/clients/paludis/upgrade_TEST
+++ b/src/clients/paludis/upgrade_TEST
@@ -1,17 +1,23 @@
#!/bin/bash
-PALUDIS_HOME=./upgrade_TEST_dir/config/ \
+PALUDIS_HOME=./upgrade_TEST_dir/config/ REPEAT= \
./paludis --config-suffix upgrade-test --install =test-category/target-1 || exit 1
./upgrade_TEST_dir/root/usr/bin/testbin | grep testbin-1 >/dev/null || exit 2
./upgrade_TEST_dir/root/usr/bin/testbin1 | grep testbin1 >/dev/null || exit 3
./upgrade_TEST_dir/root/usr/bin/testbin2 && exit 4
+PALUDIS_HOME=./upgrade_TEST_dir/config/ REPEAT=yes \
+ ./paludis --config-suffix upgrade-test --install =test-category/target-1 || exit 5
+
+./upgrade_TEST_dir/root/usr/bin/testbin | grep testbin-1 >/dev/null || exit 6
+./upgrade_TEST_dir/root/usr/bin/testbin1 | grep repeatbin1 >/dev/null || exit 7
+./upgrade_TEST_dir/root/usr/bin/testbin2 && exit 8
PALUDIS_HOME=./upgrade_TEST_dir/config/ \
- ./paludis --config-suffix upgrade-test --install target || exit 5
+ ./paludis --config-suffix upgrade-test --install target || exit 9
-./upgrade_TEST_dir/root/usr/bin/testbin | grep testbin-2 >/dev/null || exit 6
-./upgrade_TEST_dir/root/usr/bin/testbin1 2>/dev/null && exit 7
-./upgrade_TEST_dir/root/usr/bin/testbin2 | grep testbin2 >/dev/null || exit 8
+./upgrade_TEST_dir/root/usr/bin/testbin | grep testbin-2 >/dev/null || exit 10
+./upgrade_TEST_dir/root/usr/bin/testbin1 2>/dev/null && exit 11
+./upgrade_TEST_dir/root/usr/bin/testbin2 | grep testbin2 >/dev/null || exit 12
diff --git a/src/clients/paludis/upgrade_TEST_setup.sh b/src/clients/paludis/upgrade_TEST_setup.sh
index 069820c9c..b84768f0d 100755
--- a/src/clients/paludis/upgrade_TEST_setup.sh
+++ b/src/clients/paludis/upgrade_TEST_setup.sh
@@ -121,6 +121,12 @@ pkg_setup() {
local VAR3=yes
}
+src_compile() {
+ if [[ ${REPEAT} == yes ]] ; then
+ sed -i -e 's,testbin1,repeatbin1,' testbin1 || die
+ fi
+}
+
src_install() {
[[ "${VAR1}" == yes ]] || die
[[ "${VAR2}" == yes ]] || die
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index 6ee564832..c0c610fc3 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -215,8 +215,8 @@ ConsoleInstallTask::on_display_merge_list_entry(const DepListEntry & d)
} while (false);
tr1::shared_ptr<RepositoryName> repo;
- if (d.destinations && ! d.destinations->empty())
- repo.reset(new RepositoryName((d.destinations->begin()->destination)->name()));
+ if (d.destination)
+ repo.reset(new RepositoryName(d.destination->name()));
tr1::shared_ptr<PackageDatabaseEntryCollection> existing_repo(environment()->package_database()->
query(query::Matches(PackageDepSpec(
@@ -246,7 +246,7 @@ ConsoleInstallTask::on_display_merge_list_entry(const DepListEntry & d)
display_merge_list_entry_repository(d, m);
if (d.metadata->virtual_interface)
- display_merge_list_entry_for(d.metadata->virtual_interface->virtual_for, m);
+ display_merge_list_entry_for(*d.metadata->virtual_interface->virtual_for, m);
display_merge_list_entry_slot(d, m);
@@ -822,18 +822,16 @@ ConsoleInstallTask::display_merge_list_entry_status_and_update_counts(const DepL
break;
case normal_entry:
- output_no_endl(render_as_update_mode(" ["));
-
- for (SortedCollection<DepListEntryDestination>::Iterator dest(d.destinations->begin()),
- dest_end(d.destinations->end()) ; dest != dest_end ; ++dest)
{
+ output_no_endl(render_as_update_mode(" ["));
+
if (need_comma)
output_no_endl(render_as_update_mode(", "));
std::string destination_str;
tr1::shared_ptr<const DestinationsCollection> default_destinations(environment()->default_destinations());
- if (default_destinations->end() == default_destinations->find(dest->destination))
- destination_str = " ::" + stringify(dest->destination->name());
+ if (default_destinations->end() == default_destinations->find(d.destination))
+ destination_str = " ::" + stringify(d.destination->name());
if (existing_repo->empty())
{
@@ -868,9 +866,8 @@ ConsoleInstallTask::display_merge_list_entry_status_and_update_counts(const DepL
set_count<max_count>(count<max_count>() + 1);
}
- need_comma = true;
+ output_no_endl(render_as_update_mode("]"));
}
- output_no_endl(render_as_update_mode("]"));
break;
case error_entry:
@@ -1101,7 +1098,7 @@ ConsoleInstallTask::display_merge_list_entry_mask_reasons(const DepListEntry & e
if (mr_eapi == mm)
{
std::string eapi_str(environment()->package_database()->fetch_repository(
- e.package.repository)->version_metadata(e.package.name, e.package.version)->eapi.name);
+ e.package.repository)->version_metadata(e.package.name, e.package.version)->eapi->name);
if (eapi_str == "UNKNOWN")
output_no_endl(" ( " + render_as_masked(eapi_str) + " ) (probably a broken ebuild)");
diff --git a/src/output/console_query_task.cc b/src/output/console_query_task.cc
index 17680841e..bc3a51c09 100644
--- a/src/output/console_query_task.cc
+++ b/src/output/console_query_task.cc
@@ -241,7 +241,7 @@ ConsoleQueryTask::display_metadata(const PackageDepSpec &, const PackageDatabase
}
if (metadata->virtual_interface)
- display_metadata_pde("Virtual for", "VIRTUAL_FOR", metadata->virtual_interface->virtual_for);
+ display_metadata_pde("Virtual for", "VIRTUAL_FOR", *metadata->virtual_interface->virtual_for);
}
namespace
diff --git a/src/output/console_query_task.hh b/src/output/console_query_task.hh
index b4cef8c43..db5f735d1 100644
--- a/src/output/console_query_task.hh
+++ b/src/output/console_query_task.hh
@@ -22,6 +22,7 @@
#include <paludis/environment.hh>
#include <paludis/dep_spec.hh>
+#include <paludis/package_database_entry.hh>
#include <src/output/console_task.hh>
namespace paludis