summaryrefslogtreecommitdiffstats
path: root/pkg.c
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-14 23:20:45 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-14 23:20:45 (EST)
commit8b44d858a9895bfaec1f78562c9619c5652d9056 (patch)
tree6a47e7b0a01f36c6cf09262a86d811cedfe83de9 /pkg.c
parent9f88cb5044297003623fb63d47836c1167322417 (diff)
opkg: add a status flag to record if the package was automatically installed to
satisfy a dependency git-svn-id: http://opkg.googlecode.com/svn/trunk@24 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'pkg.c')
-rw-r--r--pkg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg.c b/pkg.c
index 1202845..fe9118f 100644
--- a/pkg.c
+++ b/pkg.c
@@ -558,6 +558,13 @@ char * pkg_formatted_field(pkg_t *pkg, const char *field )
temp[0]='\0';
snprintf(temp, (strlen(pkg->architecture)+17), "Architecture: %s\n", pkg->architecture);
}
+ } else if (strcasecmp(field, "Auto-Installed") == 0) {
+ /* Auto-Installed flag */
+ if (pkg->auto_installed) {
+ char * s = "Auto-Installed: yes\n";
+ temp = (char *)realloc(temp, strlen(s) + 1);
+ strcpy (temp, s);
+ }
} else {
goto UNKNOWN_FMT_FIELD;
}
@@ -1017,6 +1024,7 @@ void pkg_print_status(pkg_t * pkg, FILE * file)
pkg_print_field(pkg, file, "Architecture");
pkg_print_field(pkg, file, "Conffiles");
pkg_print_field(pkg, file, "Installed-Time");
+ pkg_print_field(pkg, file, "Auto-Installed");
fputs("\n", file);
}