summaryrefslogtreecommitdiff
path: root/src/generic/apt/matching/match.cc
diff options
context:
space:
mode:
authorDaniel Hartwig <mandyke@gmail.com>2012-06-30 02:08:40 +0800
committerDaniel Hartwig <mandyke@gmail.com>2012-06-30 02:17:53 +0800
commit74776026063942535196e63d8a0bdd10a6fdca2c (patch)
tree133bb1de03cfbbe337e2a50161d2aeb7018f0d24 /src/generic/apt/matching/match.cc
parent211e6c5e661e727f325a9b55a60a0426a678ccae (diff)
downloadaptitude-74776026063942535196e63d8a0bdd10a6fdca2c.tar.gz
Use standard apt-xapian-index location, rather than libept
Part of the process to drop libept (see bug #677551): In src/generic/apt/matching/match.cc there's already #ifdefs to do everything via libxapian. The only ept-only bit is ept::axi::path_db(). That can be replaced with "/var/lib/apt-xapian-index/index", which is the standard index location which is NOT going to change (that's actually a xapian pointer to the real index location: try "cat /var/lib/apt-xapian-index/index"). Also add configure check for libxapian headers.
Diffstat (limited to 'src/generic/apt/matching/match.cc')
-rw-r--r--src/generic/apt/matching/match.cc16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/generic/apt/matching/match.cc b/src/generic/apt/matching/match.cc
index 8d42fc28..b59d6c74 100644
--- a/src/generic/apt/matching/match.cc
+++ b/src/generic/apt/matching/match.cc
@@ -35,13 +35,7 @@
#include <cwidget/generic/util/transcode.h>
-#ifdef HAVE_EPT_AXI
-#include <ept/axi/axi.h>
-#else
-#error "Don't know how to use the debtags Xapian database."
-#endif
-
-#include <xapian/enquire.h>
+#include <xapian.h>
#include <algorithm>
@@ -61,7 +55,6 @@ namespace aptitude
{
namespace
{
-#ifdef HAVE_EPT_AXI
typedef Xapian::Database debtags_db;
const Xapian::docid get_docid_by_name(const debtags_db &db,
@@ -81,7 +74,6 @@ namespace aptitude
{
return db;
}
-#endif
/** \brief Evaluate any regular expression-based pattern.
*
@@ -388,11 +380,7 @@ namespace aptitude
{
try
{
-#ifdef HAVE_EPT_AXI
- db.reset(new Xapian::Database(ept::axi::path_db()));
-#else
-#error "Can't figure out how to create the debtags database."
-#endif
+ db.reset(new Xapian::Database("/var/lib/apt-xapian-index/index"));
}
catch(...)
{