[pacman-dev] [PATCH] Highlight new dependencies brought in by an upgrade
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@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
On 16/07/13 13:41, Connor Behan wrote:
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@gmail.com> ---
This makes little sense to me. As a user I would not make the connection that highlighted packages are new dependencies. In fact, I would expect those to be the targets that are being updated if anything. And we already have VerbosePkgLists for people who want to monitor every detail of the update. Allan
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));
On 16/07/13 13:59, Allan McRae wrote:
On 16/07/13 13:41, Connor Behan wrote:
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@gmail.com> ---
This makes little sense to me. As a user I would not make the connection that highlighted packages are new dependencies. In fact, I would expect those to be the targets that are being updated if anything.
And we already have VerbosePkgLists for people who want to monitor every detail of the update.
In addition. "pacman -Syu foo" updates and installs foo. Think about what the highlighting does then.
On 15/07/13 09:01 PM, Allan McRae wrote:
On 16/07/13 13:59, Allan McRae wrote:
On 16/07/13 13:41, Connor Behan wrote:
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@gmail.com> --- This makes little sense to me. As a user I would not make the connection that highlighted packages are new dependencies. In fact, I would expect those to be the targets that are being updated if anything.
And we already have VerbosePkgLists for people who want to monitor every detail of the update. In addition. "pacman -Syu foo" updates and installs foo. Think about what the highlighting does then.
It would highlight foo as well as any dependencies of it that weren't already installed. We could try to be smart about this and only highlight packages unrelated to what was specified on the command line but I thought this accomplished the main task without adding any computation. I also wanted relatively few packages to be highlighted - the set of packages being updated would be almost every package. But now that you suggest VerbosePkgLists, the patch doesn't seem so important. Cheers.
participants (2)
-
Allan McRae
-
Connor Behan