Print full version, not just pkg->version.
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Fri, 11 Dec 2009 06:07:49 +0000 (06:07 +0000)
committergraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Fri, 11 Dec 2009 06:07:49 +0000 (06:07 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@489 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

tests/libopkg_test.c

index 67e4103d1ac99d62d5d8ac9b0920ed8fc73a5254..720e3e9516e221c1c810c5246a40191747431e9b 100644 (file)
@@ -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);
 }