summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAriadne Conill <ariadne@dereferenced.org>2020-08-29 08:34:00 -0600
committerTimo Teräs <timo.teras@iki.fi>2020-08-29 20:37:57 +0300
commitfa63e46a75501153e78e5da0e38770fc6aae7832 (patch)
tree3130c9c49b0a5449dc3ec218d549d1900cda925d /src
parentd5dcaeb1cd322dca01c126a3c296a49901f41467 (diff)
downloadapk-tools-fa63e46a75501153e78e5da0e38770fc6aae7832.tar.gz
apk-tools-fa63e46a75501153e78e5da0e38770fc6aae7832.tar.bz2
apk-tools-fa63e46a75501153e78e5da0e38770fc6aae7832.tar.xz
apk-tools-fa63e46a75501153e78e5da0e38770fc6aae7832.zip
database: clarify the deprecation notice for checksum-less packages
Closes #10708.
Diffstat (limited to 'src')
-rw-r--r--src/database.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/database.c b/src/database.c
index 29fd6dd..6bec7f7 100644
--- a/src/database.c
+++ b/src/database.c
@@ -81,6 +81,7 @@ struct install_ctx {
int script;
char **script_args;
int script_pending : 1;
+ int missing_checksum : 1;
struct apk_db_dir_instance *diri;
struct apk_checksum data_csum;
@@ -2570,10 +2571,13 @@ static int apk_db_install_archive_entry(void *_ctx,
memcpy(&file->csum, &link_target_file->csum, sizeof file->csum);
else
memcpy(&file->csum, &ae->csum, sizeof file->csum);
- if (file->csum.type == APK_CHECKSUM_NONE) {
- apk_warning(PKG_VER_FMT": no checksum for file %s",
- PKG_VER_PRINTF(pkg), ae->name);
+ /* only warn once per package */
+ if (file->csum.type == APK_CHECKSUM_NONE && !ctx->missing_checksum) {
+ apk_warning(PKG_VER_FMT": support for packages without embedded "
+ "checksums will be dropped in apk-tools 3.",
+ PKG_VER_PRINTF(pkg));
ipkg->broken_files = 1;
+ ctx->missing_checksum = 1;
}
break;
case -ENOTSUP: