From 99e7df86764dc815bbaf59551439824d22928641 Mon Sep 17 00:00:00 2001 From: Daniel Hartwig Date: Sat, 30 Jun 2012 19:15:15 +0800 Subject: Do not group packages as tasks section based on their name Closes: #679602 --- NEWS | 3 +++ src/pkg_grouppolicy.cc | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index ade18618..0b018390 100644 --- a/NEWS +++ b/NEWS @@ -146,6 +146,9 @@ ii. to make the program more atomic and reliable when used we don't need to instruct the user to add any (Closes: #587775, #537393) + * [curses]: Do not group packages as tasks based on their name, + rather, use their section. (Closes: #679602) + - Internal changes: * Unified the way packages are selected from command line diff --git a/src/pkg_grouppolicy.cc b/src/pkg_grouppolicy.cc index bc9a5574..1844c6a0 100644 --- a/src/pkg_grouppolicy.cc +++ b/src/pkg_grouppolicy.cc @@ -259,12 +259,7 @@ void pkg_grouppolicy_section::add_package(const pkgCache::PkgIterator &pkg, bool may_passthrough = false; string section; - if(!strncmp(pkg.Name(), "task-", 5)) - { - section=_("Tasks"); - may_passthrough = true; - } - else if(pkg.VersionList().end()) + if(pkg.VersionList().end()) { section=_("virtual"); may_passthrough = true; @@ -275,6 +270,11 @@ void pkg_grouppolicy_section::add_package(const pkgCache::PkgIterator &pkg, section=_("Unknown"); may_passthrough = true; } + else if(strcmp(pkg.VersionList().Section(), "tasks") == 0) + { + section=_("Tasks"); + may_passthrough = true; + } else { section=pkg.VersionList().Section(); -- cgit v1.2.3