Changeset 4383
- Timestamp:
- 04/21/08 16:20:32 (5 years ago)
- Location:
- trunk/src/target/opkg/libopkg
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/opkg/libopkg/opkg.c
r4374 r4383 106 106 opkg_conf_deinit (opkg->conf); 107 107 args_deinit (opkg->args); 108 } 109 110 int 111 opkg_read_config_files (opkg_t *opkg) 112 { 113 args_t *a = opkg->args; 114 opkg_conf_t *c = opkg->conf; 115 116 /* Unfortunatly, the easiest way to re-read the config files right now is to 117 * throw away opkg->conf and start again */ 118 119 /* copy the settings we need to keep */ 120 a->autoremove = c->autoremove; 121 a->force_depends = c->force_depends; 122 a->force_defaults = c->force_defaults; 123 a->force_overwrite = c->force_overwrite; 124 a->force_downgrade = c->force_downgrade; 125 a->force_reinstall = c->force_reinstall; 126 a->force_removal_of_dependent_packages = c->force_removal_of_dependent_packages; 127 a->force_removal_of_essential_packages = c->force_removal_of_essential_packages; 128 a->nodeps = c->nodeps; 129 a->noaction = c->noaction; 130 a->query_all = c->query_all; 131 a->multiple_providers = c->multiple_providers; 132 a->verbosity = c->verbosity; 133 134 if (a->offline_root) free (a->offline_root); 135 a->offline_root = strdup (c->offline_root); 136 137 if (a->offline_root_pre_script_cmd) free (a->offline_root_pre_script_cmd); 138 a->offline_root_pre_script_cmd = strdup (c->offline_root_pre_script_cmd); 139 140 if (a->offline_root_post_script_cmd) free (a->offline_root_post_script_cmd); 141 a->offline_root_post_script_cmd = strdup (c->offline_root_post_script_cmd); 142 143 /* throw away old opkg_conf and start again */ 144 opkg_conf_deinit (opkg->conf); 145 opkg_conf_init (opkg->conf, opkg->args); 146 147 free (opkg->options); 148 opkg_init_options_array (opkg->conf, &opkg->options); 149 150 return 0; 108 151 } 109 152 -
trunk/src/target/opkg/libopkg/opkg.h
r4363 r4383 22 22 void opkg_get_option (opkg_t *opkg, char *option, void **value); 23 23 void opkg_set_option (opkg_t *opkg, char *option, void *value); 24 int opkg_read_config_files (opkg_t *opkg); 24 25 25 26 int opkg_install_package (opkg_t *opkg, char *package_name);
Note: See TracChangeset
for help on using the changeset viewer.
