From 211e6c5e661e727f325a9b55a60a0426a678ccae Mon Sep 17 00:00:00 2001 From: Daniel Hartwig Date: Sat, 30 Jun 2012 00:16:04 +0800 Subject: Drop support for ancient libept features; make libept use really optional The tree included several checks for various ways that libept previously did things. These old code paths have been dropped along with the checks for them. configure now also supports --disable-ept to build without using the ept library. --- src/generic/apt/matching/match.cc | 23 ----------------------- src/generic/apt/tags.cc | 24 ------------------------ src/generic/apt/tags.h | 8 -------- 3 files changed, 55 deletions(-) (limited to 'src') diff --git a/src/generic/apt/matching/match.cc b/src/generic/apt/matching/match.cc index 20545294..8d42fc28 100644 --- a/src/generic/apt/matching/match.cc +++ b/src/generic/apt/matching/match.cc @@ -35,15 +35,11 @@ #include -#ifdef HAVE_EPT_TEXTSEARCH -#include -#else #ifdef HAVE_EPT_AXI #include #else #error "Don't know how to use the debtags Xapian database." #endif -#endif #include @@ -65,21 +61,6 @@ namespace aptitude { namespace { -#ifdef HAVE_EPT_TEXTSEARCH - typedef ept::textsearch::TextSearch debtags_db; - - const Xapian::docid get_docid_by_name(const debtags_db &db, - const char *name) - { - return db.docidByName(name); - } - - const Xapian::Database &get_xapian_db(const debtags_db &db) - { - return db.db(); - } -#endif - #ifdef HAVE_EPT_AXI typedef Xapian::Database debtags_db; @@ -407,14 +388,10 @@ namespace aptitude { try { -#ifdef HAVE_EPT_TEXTSEARCH - db.reset(new ept::textsearch::TextSearch); -#else #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 #endif } catch(...) diff --git a/src/generic/apt/tags.cc b/src/generic/apt/tags.cc index e41dea46..0e906e98 100644 --- a/src/generic/apt/tags.cc +++ b/src/generic/apt/tags.cc @@ -412,17 +412,6 @@ namespace aptitude return std::string(name, split_pos + 2); } -#ifdef HAVE_EPT_DEBTAGS_FACET_DESCRIPTION - std::string get_facet_long_description(const tag &t) - { - return t.facet().longDescription(); - } - - std::string get_facet_short_description(const tag &t) - { - return t.facet().shortDescription(); - } -#else #ifdef HAVE_EPT_DEBTAGS_VOCABULARY_FACET_DATA std::string get_facet_long_description(const tag &t) { @@ -456,19 +445,7 @@ namespace aptitude #else #error "Don't know how to retrieve facet descriptions." #endif -#endif -#ifdef HAVE_EPT_DEBTAGS_TAG_DESCRIPTION - std::string get_tag_long_description(const tag &t) - { - return t.longDescription(); - } - - std::string get_tag_short_description(const tag &t) - { - return t.shortDescription(); - } -#else #ifdef HAVE_EPT_DEBTAGS_VOCABULARY_TAG_DATA std::string get_tag_long_description(const tag &t) { @@ -501,7 +478,6 @@ namespace aptitude } #else #error "Don't know how to retrieve tag descriptions." -#endif #endif } } diff --git a/src/generic/apt/tags.h b/src/generic/apt/tags.h index d4d5171c..6ec61a14 100644 --- a/src/generic/apt/tags.h +++ b/src/generic/apt/tags.h @@ -233,13 +233,6 @@ namespace aptitude { namespace apt { -#ifdef HAVE_EPT_DEBTAGS_TAG - typedef ept::debtags::Tag tag; - inline std::string get_fullname(const tag &t) - { - return t.fullname(); - } -#else #ifdef EPT_DEBTAGS_GETTAGSOFITEM_RETURNS_STRINGS typedef std::string tag; inline std::string get_fullname(const std::string &t) @@ -250,7 +243,6 @@ namespace aptitude // Probably means a new version of libept does something the // configure checks can't recognize. #error "Don't know how to represent a debtags tag." -#endif #endif const std::set get_tags(const pkgCache::PkgIterator &pkg); -- cgit v1.2.3