[pacman-dev] [PATCH] Highlight new dependencies brought in by an upgrade

Connor Behan connor.behan at gmail.com
Mon Jul 15 23:41:42 EDT 2013


Users trying to keep a lightweight system often scan the list of targets
for red flags. This just makes it easier for them.

Signed-off-by: Connor Behan <connor.behan at gmail.com>
---
 src/pacman/util.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/pacman/util.c b/src/pacman/util.c
index 23c4009..f3202f7 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -909,8 +909,14 @@ static void _display_targets(alpm_list_t *targets, int verbose)
 		}
 
 		if(target->install) {
-			pm_asprintf(&str, "%s-%s", alpm_pkg_get_name(target->install),
-					alpm_pkg_get_version(target->install));
+			if(!target->remove && config->op_s_upgrade) {
+				const colstr_t *colstr = &config->colstr;
+				pm_asprintf(&str, "%s%s-%s%s", colstr->title, alpm_pkg_get_name(target->install),
+						alpm_pkg_get_version(target->install), colstr->nocolor);
+			} else {
+				pm_asprintf(&str, "%s-%s", alpm_pkg_get_name(target->install),
+						alpm_pkg_get_version(target->install));
+			}
 		} else if(isize == 0) {
 			pm_asprintf(&str, "%s-%s", alpm_pkg_get_name(target->remove),
 					alpm_pkg_get_version(target->remove));
-- 
1.8.3.2



More information about the pacman-dev mailing list