Display old and new version in pacman -Qu output
This changes the output from "foo 1.0" to "foo 1.0 -> 1.1" which makes cronjobs that mail the -Qu output way more helpful. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
8eb8995aa7
commit
d43f54e5c4
1 changed files with 8 additions and 1 deletions
|
@ -318,8 +318,15 @@ static int display(alpm_pkg_t *pkg)
|
||||||
&& !config->op_q_changelog && !config->op_q_check) {
|
&& !config->op_q_changelog && !config->op_q_check) {
|
||||||
if(!config->quiet) {
|
if(!config->quiet) {
|
||||||
const colstr_t *colstr = &config->colstr;
|
const colstr_t *colstr = &config->colstr;
|
||||||
printf("%s%s %s%s%s\n", colstr->title, alpm_pkg_get_name(pkg),
|
printf("%s%s %s%s%s", colstr->title, alpm_pkg_get_name(pkg),
|
||||||
colstr->version, alpm_pkg_get_version(pkg), colstr->nocolor);
|
colstr->version, alpm_pkg_get_version(pkg), colstr->nocolor);
|
||||||
|
|
||||||
|
if(config->op_q_upgrade) {
|
||||||
|
alpm_pkg_t *newpkg = alpm_sync_newversion(pkg, alpm_get_syncdbs(config->handle));
|
||||||
|
printf(" -> %s%s%s", colstr->version, alpm_pkg_get_version(newpkg), colstr->nocolor);
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("\n");
|
||||||
} else {
|
} else {
|
||||||
printf("%s\n", alpm_pkg_get_name(pkg));
|
printf("%s\n", alpm_pkg_get_name(pkg));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue