Skip to content

Commit c88e1bc

Browse files
authored
Merge pull request aurutils#1216 from aurutils/repo-qu
repo: avoid empty output with -q -u
2 parents 0dd81aa + f3ed77a commit c88e1bc

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/pacman/aur-repo

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99
argv0=repo
1010

1111
# default options
12-
db_query=file mode=none conf_args=() vercmp_args=() parse_args=() missing=0
12+
db_query=file mode=none quiet=0 conf_args=() vercmp_args=() parse_args=() missing=0
1313

1414
args_csv() {
1515
# shellcheck disable=SC2155
@@ -65,7 +65,7 @@ while true; do
6565
-u|--upgrades)
6666
mode=upgrades ;;
6767
-q|--quiet)
68-
parse_args+=(-q); vercmp_args+=(-q) ;;
68+
quiet=1 ;;
6969
-S|--sync)
7070
db_query=sync ;;
7171
-F|--attr|--field)
@@ -97,6 +97,13 @@ while true; do
9797
shift
9898
done
9999

100+
# Conditionally add --quiet (#1215)
101+
if (( quiet )) && [[ $mode == "upgrades" ]]; then
102+
vercmp_args+=(-q)
103+
elif (( quiet )) && [[ $mode == "list" ]]; then
104+
parse_args+=(-q)
105+
fi
106+
100107
# assign environment variables
101108
db_ext=${db_ext:-$AUR_DBEXT} db_name=${db_name:-$AUR_REPO} db_root=${db_root:-$AUR_DBROOT}
102109

makepkg/aurutils.changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
* `aur-chroot`
1818
+ preserve `LOGDEST` and `SRCDEST` by default (#1196)
1919

20+
* `aur-repo`
21+
+ avoid empty output with `-q -u` (#1215)
22+
2023
* `aur-sync`
2124
+ pre-process .SRCINFO with `pacini` (#1203)
2225

0 commit comments

Comments
 (0)