summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2021-08-07 08:31:31 -0400
committerTimo Teräs <timo.teras@iki.fi>2021-09-03 13:24:39 +0300
commitbd156836703e52166c282a0fea50a45498cfabdd (patch)
treeb52b6ca29932962a9b64070e01bd6496464f63ba /src
parent9b3e68d4ba7b2dd8e85539fe157ca4bfa9a24d93 (diff)
downloadapk-tools-bd156836703e52166c282a0fea50a45498cfabdd.tar.gz
apk-tools-bd156836703e52166c282a0fea50a45498cfabdd.tar.bz2
apk-tools-bd156836703e52166c282a0fea50a45498cfabdd.tar.xz
apk-tools-bd156836703e52166c282a0fea50a45498cfabdd.zip
add: warn when creating empty virtual packages
see https://gitlab.alpinelinux.org/alpine/aports/-/issues/11736 [TT: minor stylistic change]
Diffstat (limited to 'src')
-rw-r--r--src/app_add.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/app_add.c b/src/app_add.c
index 345fd7a..214bf67 100644
--- a/src/app_add.c
+++ b/src/app_add.c
@@ -147,6 +147,8 @@ static int add_main(void *ctx, struct apk_ctx *ac, struct apk_string_array *args
virtdep.result_mask = APK_VERSION_EQUAL;
virtdep.version = virtpkg->version;
+
+ if (!args->num) apk_warn(out, "creating empty virtual package");
}
foreach_array_item(parg, args) {