summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/list.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/list.c b/src/list.c
index 14f5fb5..e285e3f 100644
--- a/src/list.c
+++ b/src/list.c
@@ -101,9 +101,15 @@ static const struct apk_package *is_upgradable(struct apk_name *name, const stru
static void print_package(const struct apk_package *pkg, const struct list_ctx *ctx)
{
- printf(PKG_VER_FMT " " BLOB_FMT " {" BLOB_FMT "} (" BLOB_FMT ")",
- PKG_VER_PRINTF(pkg), BLOB_PRINTF(*pkg->arch), BLOB_PRINTF(*pkg->origin),
- BLOB_PRINTF(*pkg->license));
+ printf(PKG_VER_FMT " " BLOB_FMT " ",
+ PKG_VER_PRINTF(pkg), BLOB_PRINTF(*pkg->arch));
+
+ if (pkg->origin != NULL)
+ printf("{" BLOB_FMT "}", BLOB_PRINTF(*pkg->origin));
+ else
+ printf("{%s}", pkg->name->name);
+
+ printf(" (" BLOB_FMT ")", BLOB_PRINTF(*pkg->license));
if (pkg->ipkg)
printf(" [installed]");