summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEnrico Zini <enrico@enricozini.org>2010-05-10 11:33:37 +0100
committerEnrico Zini <enrico@enricozini.org>2010-05-10 11:38:59 +0100
commit137b229b33189c173e383684808f4dea9fe1f235 (patch)
tree2d3ce76185b650204399d15aff2e6ca8adeba1ff /tools
parentf5c2f7507dfe4f8a5b7159073204dff2c87cb891 (diff)
downloadlibept-137b229b33189c173e383684808f4dea9fe1f235.tar.gz
Big debtags code simplification
no more indices to maintain, just read the text files no more int IDs and conversions to/from strings
Diffstat (limited to 'tools')
-rw-r--r--tools/ept-cache.cc6
-rw-r--r--tools/filters.h2
-rw-r--r--tools/info.cc4
-rw-r--r--tools/info.h6
-rw-r--r--tools/utils.h4
5 files changed, 10 insertions, 12 deletions
diff --git a/tools/ept-cache.cc b/tools/ept-cache.cc
index 2b28eec..6ee3205 100644
--- a/tools/ept-cache.cc
+++ b/tools/ept-cache.cc
@@ -1,7 +1,7 @@
/*
* ept-cache - Commandline interface to the ept library
*
- * Copyright (C) 2007 Enrico Zini <enrico@debian.org>
+ * Copyright (C) 2007--2010 Enrico Zini <enrico@debian.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@
#include <ept/apt/packagerecord.h>
#include <ept/popcon/popcon.h>
#include <ept/popcon/local.h>
-#include <ept/debtags/expression.h>
+#include <tagcoll/expression.h>
#include <ept/textsearch/textsearch.h>
#include <ept/textsearch/extraindexers.h>
@@ -568,7 +568,7 @@ struct Generator
generateRecords(out);
}
- void debtagsSearch(const set<Tag>& wantedTags, Consumer& out)
+ void debtagsSearch(const set<std::string>& wantedTags, Consumer& out)
{
debug("Generate by querying debtags\n");
env().debtags().outputHavingTags(wantedTags, OutputInfo(filters, out));
diff --git a/tools/filters.h b/tools/filters.h
index fa8c2b0..050172a 100644
--- a/tools/filters.h
+++ b/tools/filters.h
@@ -24,7 +24,7 @@
#include <vector>
#include <string>
-#include <ept/debtags/expression.h>
+#include <tagcoll/expression.h>
/*
* * For packages
diff --git a/tools/info.cc b/tools/info.cc
index cd9966d..64aff2e 100644
--- a/tools/info.cc
+++ b/tools/info.cc
@@ -1,7 +1,7 @@
/*
* ept-cache - Commandline interface to the ept library
*
- * Copyright (C) 2007 Enrico Zini <enrico@debian.org>
+ * Copyright (C) 2007--2010 Enrico Zini <enrico@debian.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -101,7 +101,7 @@ void Info::wantTags()
set<string> stags = record->tag();
for (set<string>::const_iterator i = stags.begin();
i != stags.end(); ++i)
- tags.insert(env().voc().tagByName(*i));
+ tags.insert(*i);
}
has_tags = true;
}
diff --git a/tools/info.h b/tools/info.h
index 2cbe249..7fe6d0b 100644
--- a/tools/info.h
+++ b/tools/info.h
@@ -1,7 +1,7 @@
/*
* ept-cache - Commandline interface to the ept library
*
- * Copyright (C) 2007 Enrico Zini <enrico@debian.org>
+ * Copyright (C) 2007--2010 Enrico Zini <enrico@debian.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
#ifndef EPTCACHE_INFO_H
#define EPTCACHE_INFO_H
-#include <ept/debtags/tag.h>
-
#include <string>
#include <set>
@@ -57,7 +55,7 @@ struct Info
ept::apt::PackageRecord* record;
bool has_tags;
- std::set<ept::debtags::Tag> tags;
+ std::set<std::string> tags;
bool has_popcon;
float popcon;
diff --git a/tools/utils.h b/tools/utils.h
index 3e4b283..d0e7034 100644
--- a/tools/utils.h
+++ b/tools/utils.h
@@ -36,9 +36,9 @@ basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& out, cons
for (typename std::set<TAG>::const_iterator i = tags.begin();
i != tags.end(); i++)
if (i == tags.begin())
- out << i->fullname();
+ out << *i;
else
- out << ", " << i->fullname();
+ out << ", " << *i;
return out;
}