satisfy a dependency
git-svn-id: http://opkg.googlecode.com/svn/trunk@24
e8e0d7a0-c8d9-11dd-a880-
a1081c7ac358
&& (dep->state_status != SS_UNPACKED)) {
opkg_message(conf, OPKG_DEBUG2,"Function: %s calling opkg_install_pkg \n",__FUNCTION__);
err = opkg_install_pkg(conf, dep,0);
&& (dep->state_status != SS_UNPACKED)) {
opkg_message(conf, OPKG_DEBUG2,"Function: %s calling opkg_install_pkg \n",__FUNCTION__);
err = opkg_install_pkg(conf, dep,0);
+ /* mark this package as having been automatically installed to
+ * satisfy a dependancy */
+ dep->auto_installed = 1;
if (err) {
pkg_vec_free(depends);
return err;
if (err) {
pkg_vec_free(depends);
return err;
temp[0]='\0';
snprintf(temp, (strlen(pkg->architecture)+17), "Architecture: %s\n", pkg->architecture);
}
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;
}
} else {
goto UNKNOWN_FMT_FIELD;
}
pkg_print_field(pkg, file, "Architecture");
pkg_print_field(pkg, file, "Conffiles");
pkg_print_field(pkg, file, "Installed-Time");
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");
int arch_priority;
/* Adding this flag, to "force" opkg to choose a "provided_by_hand" package, if there are multiple choice */
int provided_by_hand;
int arch_priority;
/* Adding this flag, to "force" opkg to choose a "provided_by_hand" package, if there are multiple choice */
int provided_by_hand;
+
+ /* this flag specifies whether the package was installed to satisfy another
+ * package's dependancies */
+ int auto_installed;
case 'A':
if(isGenericFieldType("Architecture:", *lines))
pkg->architecture = parseGenericFieldType("Architecture", *lines);
case 'A':
if(isGenericFieldType("Architecture:", *lines))
pkg->architecture = parseGenericFieldType("Architecture", *lines);
+ else if(isGenericFieldType("Auto-Installed:", *lines)) {
+ char *auto_installed_value;
+ auto_installed_value = parseGenericFieldType("Auto-Installed:", *lines);
+ if (strcmp(auto_installed_value, "yes") == 0) {
+ pkg->auto_installed = 1;
+ }
+ free(auto_installed_value);
+ pkg->architecture = parseGenericFieldType("Auto-Installed", *lines);
+ }