-char * pkg_formatted_info(pkg_t *pkg )
-{
- char *line;
- char * buff;
-
- buff = calloc(1, 8192);
- if (buff == NULL) {
- fprintf(stderr, "%s: out of memory\n", __FUNCTION__);
- return NULL;
- }
-
- buff[0] = '\0';
-
- line = pkg_formatted_field(pkg, "Package");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Version");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Depends");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Recommends");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Suggests");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Provides");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Replaces");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Conflicts");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Status");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Section");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Essential"); /* @@@@ should be removed in future release. *//* I do not agree with this Pigi*/
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Architecture");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Maintainer");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "MD5sum");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Size");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Filename");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Conffiles");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Source");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Description");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Installed-Time");
- strncat(buff ,line, strlen(line));
- free(line);
-
- line = pkg_formatted_field(pkg, "Tags");
- strncat(buff ,line, strlen(line));
- free(line);
-
- return buff;
-}
-
-char * pkg_formatted_field(pkg_t *pkg, const char *field )