summaryrefslogtreecommitdiffstats
path: root/src/pacman/query.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/query.c')
-rw-r--r--src/pacman/query.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c
index be7ca837..36b4af80 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -124,6 +124,19 @@ int pacman_query(alpm_list_t *targets)
}
}
+ if(config->op_q_upgrade) {
+ MSG(NL, _("Checking for package upgrades"));
+ alpm_list_t *syncpkgs;
+
+ if((syncpkgs = alpm_get_upgrades()) != NULL) {
+ display_targets(syncpkgs);
+ return(0);
+ } else {
+ MSG(NL, _("no upgrades found"));
+ return(1);
+ }
+ }
+
for(i = targets; !done; i = (i ? alpm_list_next(i) : NULL)) {
if(targets == NULL) {
done = 1;