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 67e4103..720e3e9 100644 (file)
@@ -60,6 +60,7 @@ package_list_upgradable_callback (pkg_t *pkg, void *data)
 void
 print_package (pkg_t *pkg)
 {
 void
 print_package (pkg_t *pkg)
 {
+  char *v = pkg_version_str_alloc(pkg);
   printf (
       "Name:         %s\n"
       "Version:      %s\n"
   printf (
       "Name:         %s\n"
       "Version:      %s\n"
@@ -70,14 +71,14 @@ print_package (pkg_t *pkg)
       "Size:         %ld\n"
       "Status:       %d\n",
       pkg->name,
       "Size:         %ld\n"
       "Status:       %d\n",
       pkg->name,
-      pkg->version,
+      v,
       pkg->src->name,
       pkg->architecture,
       pkg->description,
       pkg->src->name,
       pkg->architecture,
       pkg->description,
-      pkg->tags,
+      pkg->tags? pkg->tags : "",
       pkg->size,
       pkg->size,
-      pkg->state_status
-      );
+      pkg->state_status);
+  free(v);
 }
 
 
 }