summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hartwig <mandyke@gmail.com>2012-07-10 11:40:23 +0800
committerDaniel Hartwig <mandyke@gmail.com>2012-07-10 14:31:24 +0800
commita6b2e20396aa754c0d2445312c744e82510b7f84 (patch)
treefae8150361fda76b8f1db58565c8e964d642e0e3
parent8e1e8fb7b418cd522e24810460d33c86f0cd6009 (diff)
downloadaptitude-a6b2e20396aa754c0d2445312c744e82510b7f84.tar.gz
Really silence errors when debtags is not installed
Closes: #681021
-rw-r--r--NEWS3
-rw-r--r--src/generic/apt/tags.cc4
2 files changed, 7 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 8dbd4ebe..ed277823 100644
--- a/NEWS
+++ b/NEWS
@@ -152,6 +152,9 @@ ii. to make the program more atomic and reliable when used
* [curses]: Do not group packages as tasks based on their name,
rather, use their section. (Closes: #679602)
+ * [all]: Really silence errors when debtags is not installed
+ (Closes: #681021)
+
- Internal changes:
* Unified the way packages are selected from command line
diff --git a/src/generic/apt/tags.cc b/src/generic/apt/tags.cc
index f0d482b0..beef11e5 100644
--- a/src/generic/apt/tags.cc
+++ b/src/generic/apt/tags.cc
@@ -200,7 +200,9 @@ const std::set<tag> aptitude::apt::get_tags(const pkgCache::PkgIterator &pkg)
static bool read_debtags_package_tags(OpProgress *progress,
const std::string &filename)
{
+ _error->PushToStack();
FileFd F(filename, FileFd::ReadOnly);
+ _error->RevertToStack();
if(!F.IsOpen())
{
@@ -320,8 +322,10 @@ static void init_vocabulary()
facet_descriptions = new facet_description_map;
tag_descriptions = new tag_description_map;
+ _error->PushToStack();
FileFd F(aptcfg->FindFile("DebTags::Vocabulary", "/var/lib/debtags/vocabulary"),
FileFd::ReadOnly);
+ _error->RevertToStack();
if(!F.IsOpen())
{