[pacman-dev] [PATCH] Put explicitly installed packages in bold during update/install/removal

Guillaume Bouchard guillaum.bouchard at gmail.com
Fri Jan 24 09:17:37 EST 2014


In extended table view, packages which are explicitly installed are
displayed as CELL_TITLE (i.e. in bold). This helps understanding why
packages are updated.

This helps the package managment workflow. During update, we can
quickly have a look at why packages are updated and easilly track and
remove the explicit packages which are not longer required. During
remove, it shows all the explicit packages which are also removed by a
cascade removal. During install, it provides a feedback on how your
action will affect the database.

Signed-off-by: Guillaume Bouchard <guillaum.bouchard at gmail.com>
---
 src/pacman/util.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/pacman/util.c b/src/pacman/util.c
index 58b0cec..a3ee5ee 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -808,7 +808,12 @@ static alpm_list_t *create_verbose_row(pm_target_t *target)
 	} else {
 		pm_asprintf(&str, "%s", alpm_pkg_get_name(target->remove));
 	}
-	add_table_cell(&ret, str, CELL_NORMAL);
+	if(alpm_pkg_get_reason(target->remove ? target->remove : target->install) == ALPM_PKG_REASON_EXPLICIT) {
+		/* put emphasis on the package name if it is an explicitly installed package */
+		add_table_cell(&ret, str, CELL_TITLE);
+	} else {
+		add_table_cell(&ret, str, CELL_NORMAL);
+	}
 
 	/* old and new versions */
 	pm_asprintf(&str, "%s",
-- 
1.8.5.2



More information about the pacman-dev mailing list