From b9f63a0992591fb76cb50e898579ad5718c7ef92 Mon Sep 17 00:00:00 2001 From: "graham.gower" Date: Fri, 11 Dec 2009 06:07:49 +0000 Subject: [PATCH] Print full version, not just pkg->version. git-svn-id: http://opkg.googlecode.com/svn/trunk@489 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- tests/libopkg_test.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/libopkg_test.c b/tests/libopkg_test.c index 67e4103..720e3e9 100644 --- a/tests/libopkg_test.c +++ b/tests/libopkg_test.c @@ -60,6 +60,7 @@ package_list_upgradable_callback (pkg_t *pkg, void *data) void print_package (pkg_t *pkg) { + char *v = pkg_version_str_alloc(pkg); printf ( "Name: %s\n" "Version: %s\n" @@ -70,14 +71,14 @@ print_package (pkg_t *pkg) "Size: %ld\n" "Status: %d\n", pkg->name, - pkg->version, + v, pkg->src->name, pkg->architecture, pkg->description, - pkg->tags, + pkg->tags? pkg->tags : "", pkg->size, - pkg->state_status - ); + pkg->state_status); + free(v); } -- 2.25.1