diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2023-03-24 16:21:37 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2023-03-24 16:22:17 +0100 |
commit | 4abee510e6f615101764c049fe179d5f1feb1ec9 (patch) | |
tree | 14fb7e81edcc9c0008e246b8996320c3a6b3727f /tests | |
parent | afe1fdd6025a40ccfd05eea2c71eded522393ec4 (diff) | |
download | alpine-conf-4abee510e6f615101764c049fe179d5f1feb1ec9.zip |
tests: add fake apk info support
fake apk info --depends gnome
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/bin/apk | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/bin/apk b/tests/bin/apk index cf06ed7..9868230 100755 --- a/tests/bin/apk +++ b/tests/bin/apk @@ -15,7 +15,7 @@ while [ $# -gt 0 ]; do echo "DEBUG: fake apk" "$@" cmd="$1" ;; - audit) + audit|info) cmd="$1" ;; -p|--root) @@ -28,6 +28,7 @@ while [ $# -gt 0 ]; do --arch) shift ;; --repositories-file) shift ;; --keys-dir) shift ;; + -*) subopt="$1";; [a-z]*) pkgs="$pkgs $1" ;; @@ -49,6 +50,20 @@ case "$cmd" in cache|update|del) exit 0 ;; + info) + case "$subopt" in + -r|--depends) + for pkg in $pkgs; do + if ! [ -n "$quiet" ]; then + printf "%s depends on:\n\n" + fi + case "$pkg" in + *gnome*) printf "gnome-shell\ngvfs\n";; + esac + done + ;; + esac + ;; esac for pkg in $pkgs; do |