aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-30 23:56:50 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-30 23:56:50 +0000
commit42d73ef9ad00615d05563262beaebb297f4ec5a9 (patch)
tree6795eb8d8e713c891cabac2ccfae11344674ee7d
parentbeba03aa17be63258c94349ac24a75a8cdba4002 (diff)
downloadpaludis-42d73ef9ad00615d05563262beaebb297f4ec5a9.tar.gz
paludis-42d73ef9ad00615d05563262beaebb297f4ec5a9.tar.xz
Remove installed db. We're not going to do it that way.
-rw-r--r--paludis/default_environment.cc3
-rw-r--r--paludis/dep_list.cc2
-rw-r--r--paludis/environment.cc5
-rw-r--r--paludis/environment.hh15
-rw-r--r--paludis/fake_repository.hh5
-rw-r--r--paludis/portage_repository.hh5
-rw-r--r--paludis/qa/environment.cc3
-rw-r--r--paludis/repository.hh7
-rw-r--r--paludis/test_environment.cc3
-rw-r--r--paludis/vdb_repository.hh5
10 files changed, 30 insertions, 23 deletions
diff --git a/paludis/default_environment.cc b/paludis/default_environment.cc
index 44dbf22..6d4635e 100644
--- a/paludis/default_environment.cc
+++ b/paludis/default_environment.cc
@@ -29,8 +29,7 @@
using namespace paludis;
DefaultEnvironment::DefaultEnvironment() :
- Environment(PackageDatabase::Pointer(new PackageDatabase),
- PackageDatabase::Pointer(new PackageDatabase))
+ Environment(PackageDatabase::Pointer(new PackageDatabase))
{
Context context("When loading default environment:");
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index 4574e05..0d6d1ce 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -314,8 +314,6 @@ DepList::visit(const PackageDepAtom * const p)
{
Context context("When resolving package dependency '" + stringify(*p) + "':");
- /// \todo check installed db
-
/* are we already there? */
std::list<DepListEntry>::iterator i;
if (_imp->merge_list.end() != ((i = std::find_if(
diff --git a/paludis/environment.cc b/paludis/environment.cc
index 7d9d861..244c2c2 100644
--- a/paludis/environment.cc
+++ b/paludis/environment.cc
@@ -22,9 +22,8 @@
using namespace paludis;
-Environment::Environment(PackageDatabase::Pointer d, PackageDatabase::Pointer i) :
- _package_database(d),
- _installed_database(i)
+Environment::Environment(PackageDatabase::Pointer d) :
+ _package_database(d)
{
}
diff --git a/paludis/environment.hh b/paludis/environment.hh
index 4dfd7c7..84beeb2 100644
--- a/paludis/environment.hh
+++ b/paludis/environment.hh
@@ -36,8 +36,8 @@ namespace paludis
{
/**
* Represents a working environment, which contains an available packages
- * database and an installed packages database and provides various methods
- * for querying package visibility and options.
+ * database and provides various methods for querying package visibility
+ * and options.
*
* \ingroup Environment
*/
@@ -46,13 +46,12 @@ namespace paludis
{
private:
PackageDatabase::Pointer _package_database;
- PackageDatabase::Pointer _installed_database;
protected:
/**
* Constructor.
*/
- Environment(PackageDatabase::Pointer, PackageDatabase::Pointer);
+ Environment(PackageDatabase::Pointer);
public:
/**
@@ -90,14 +89,6 @@ namespace paludis
}
/**
- * Fetch our installed database.
- */
- PackageDatabase::Pointer installed_database() const
- {
- return _installed_database;
- }
-
- /**
* Destructor.
*/
virtual ~Environment();
diff --git a/paludis/fake_repository.hh b/paludis/fake_repository.hh
index 7aede5d..59fd5c9 100644
--- a/paludis/fake_repository.hh
+++ b/paludis/fake_repository.hh
@@ -123,6 +123,11 @@ namespace paludis
typedef CountedPtr<FakeRepository, count_policy::InternalCountTag> Pointer;
typedef CountedPtr<const FakeRepository, count_policy::InternalCountTag> ConstPointer;
+
+ virtual bool installed() const
+ {
+ return false;
+ }
};
}
diff --git a/paludis/portage_repository.hh b/paludis/portage_repository.hh
index 534e2e9..8905856 100644
--- a/paludis/portage_repository.hh
+++ b/paludis/portage_repository.hh
@@ -113,6 +113,11 @@ namespace paludis
* Destructor.
*/
~PortageRepository();
+
+ virtual bool installed() const
+ {
+ return false;
+ }
};
/**
diff --git a/paludis/qa/environment.cc b/paludis/qa/environment.cc
index 60ee8d0..52e295f 100644
--- a/paludis/qa/environment.cc
+++ b/paludis/qa/environment.cc
@@ -24,8 +24,7 @@ using namespace paludis;
using namespace paludis::qa;
QAEnvironment::QAEnvironment(const FSEntry & base) :
- Environment(PackageDatabase::Pointer(new PackageDatabase),
- PackageDatabase::Pointer(new PackageDatabase))
+ Environment(PackageDatabase::Pointer(new PackageDatabase))
{
std::map<std::string, std::string> keys;
diff --git a/paludis/repository.hh b/paludis/repository.hh
index 5bd842f..4c8f0b1 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -375,6 +375,13 @@ namespace paludis
{
do_install(q, v);
}
+
+ /**
+ * Return whether we are an 'installed' repo.
+ *
+ * No NVI indirection here, it's not worth it.
+ */
+ virtual bool installed() const = 0;
};
/**
diff --git a/paludis/test_environment.cc b/paludis/test_environment.cc
index 81d47dc..a686a01 100644
--- a/paludis/test_environment.cc
+++ b/paludis/test_environment.cc
@@ -22,8 +22,7 @@
using namespace paludis;
TestEnvironment::TestEnvironment() :
- Environment(PackageDatabase::Pointer(new PackageDatabase),
- PackageDatabase::Pointer(new PackageDatabase))
+ Environment(PackageDatabase::Pointer(new PackageDatabase))
{
}
diff --git a/paludis/vdb_repository.hh b/paludis/vdb_repository.hh
index 651358f..6309ecb 100644
--- a/paludis/vdb_repository.hh
+++ b/paludis/vdb_repository.hh
@@ -90,6 +90,11 @@ namespace paludis
* Destructor.
*/
~VDBRepository();
+
+ virtual bool installed() const
+ {
+ return true;
+ }
};
/**