]> git.ipfire.org Git - pakfire.git/commitdiff
archive: Be less noisy if we cannot open an archive
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Oct 2024 19:25:53 +0000 (19:25 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Oct 2024 19:25:53 +0000 (19:25 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/archive.c

index f1f85780e965823b44d59708b0cbe8058f17ae71..d2c8936819a841cec14992a9605792beef998bae 100644 (file)
@@ -150,11 +150,8 @@ static struct archive* open_archive(struct pakfire_archive* archive, FILE* f) {
 
        // Try opening the archive file
        int r = archive_read_open_FILE(a, f);
-       if (r) {
-               CTX_ERROR(archive->ctx, "Could not open archive %s: %s\n",
-                       archive->path, archive_error_string(a));
+       if (r)
                goto ERROR;
-       }
 
        // Success
        return a;
@@ -470,13 +467,13 @@ static int pakfire_archive_read_metadata(struct pakfire_archive* archive) {
 
        // Check if we could successfully read something
        if (!archive->format) {
-               CTX_ERROR(archive->ctx, "Archive has an unknown format\n");
+               CTX_DEBUG(archive->ctx, "Archive has an unknown format\n");
                return -ENOMSG;
        }
 
        // Check if we have read some metadata
        if (!archive->metadata) {
-               CTX_ERROR(archive->ctx, "Archive has no metadata\n");
+               CTX_DEBUG(archive->ctx, "Archive has no metadata\n");
                return -ENOMSG;
        }