diff options
author | ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2008-12-15 00:28:44 (EST) |
---|---|---|
committer | ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2008-12-15 00:28:44 (EST) |
commit | 2858b18db8d4cbbf5b76fee3abd734c2fc773e12 (patch) | |
tree | cee8c0c3a43b722f62680ed61a943b3273a68f66 /libopkg/opkg_conf.c | |
parent | bb746681b0455150179978ddd5e6fadb4d18b0f3 (diff) |
opkg: adding cache support
opkg-cl --cache <cache_directory>
Thank for Werner
git-svn-id: http://opkg.googlecode.com/svn/trunk@154 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/opkg_conf.c')
-rw-r--r-- | libopkg/opkg_conf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c index 93ef823..b61fa3e 100644 --- a/libopkg/opkg_conf.c +++ b/libopkg/opkg_conf.c @@ -49,6 +49,7 @@ static int set_and_load_pkg_dest_list(opkg_conf_t *conf, int opkg_init_options_array(const opkg_conf_t *conf, opkg_option_t **options) { opkg_option_t tmp[] = { + { "cache", OPKG_OPT_TYPE_STRING, &conf->cache}, { "force_defaults", OPKG_OPT_TYPE_BOOL, &conf->force_defaults }, { "force_depends", OPKG_OPT_TYPE_BOOL, &conf->force_depends }, { "force_overwrite", OPKG_OPT_TYPE_BOOL, &conf->force_overwrite }, @@ -270,6 +271,8 @@ int opkg_conf_init(opkg_conf_t *conf, const args_t *args) opkg_conf_override_string(&conf->offline_root_post_script_cmd, args->offline_root_post_script_cmd); + opkg_conf_override_string(&conf->cache, args->cache); + /* Pigi: added a flag to disable the checking of structures if the command does not need to read anything from there. */ @@ -338,6 +341,8 @@ void opkg_conf_deinit(opkg_conf_t *conf) opkg_conf_free_string(&conf->offline_root_pre_script_cmd); opkg_conf_free_string(&conf->offline_root_post_script_cmd); + opkg_conf_free_string(&conf->cache); + if (conf->verbosity > 1) { int i; hash_table_t *hashes[] = { |