]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Show more information if setup fails
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 18 Oct 2024 12:52:20 +0000 (12:52 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 18 Oct 2024 12:52:20 +0000 (12:52 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/pakfire.c

index c3e36f0ba965c3de9ba1efd5e0361b1a5e709fff..664cce0a4b1e5a913ad61b1c46c220a1229a6a0f 100644 (file)
@@ -811,8 +811,10 @@ PAKFIRE_EXPORT int pakfire_create(struct pakfire** pakfire, struct pakfire_ctx*
 
        // Setup user/group
        r = pakfire_setup_user(p);
-       if (r < 0)
+       if (r < 0) {
+               CTX_ERROR(p->ctx, "Could not parse user information: %s\n", strerror(-r));
                goto ERROR;
+       }
 
        // Store if we have a path
        if (path)
@@ -834,8 +836,10 @@ PAKFIRE_EXPORT int pakfire_create(struct pakfire** pakfire, struct pakfire_ctx*
 
        // Import distro configuration
        r = pakfire_config_import_distro(p);
-       if (r < 0)
+       if (r < 0) {
+               CTX_ERROR(p->ctx, "Could not parse distribution from configuration: %s\n", strerror(-r));
                goto ERROR;
+       }
 
        // Read /etc/os-release
        if (p->internal_flags & PAKFIRE_HAS_PATH) {