From a6b2e20396aa754c0d2445312c744e82510b7f84 Mon Sep 17 00:00:00 2001 From: Daniel Hartwig Date: Tue, 10 Jul 2012 11:40:23 +0800 Subject: Really silence errors when debtags is not installed Closes: #681021 --- NEWS | 3 +++ src/generic/apt/tags.cc | 4 ++++ 2 files changed, 7 insertions(+) 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 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()) { -- cgit v1.2.3