summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg_conf.c
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:29:02 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:29:02 (EST)
commit1475a6802f47230c01cf4a37ee5a6686a4718f79 (patch)
treebfc156c15ecfc5e98fd507fdaaba0ead85d14a8d /libopkg/opkg_conf.c
parent2858b18db8d4cbbf5b76fee3abd734c2fc773e12 (diff)
opkg: add a simple way to pass a path environment for pre/post scription execution when in offline mode.
Thanks for Christopher Hall <hsw@openmoko.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@155 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/opkg_conf.c')
-rw-r--r--libopkg/opkg_conf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
index b61fa3e..99db505 100644
--- a/libopkg/opkg_conf.c
+++ b/libopkg/opkg_conf.c
@@ -63,6 +63,7 @@ int opkg_init_options_array(const opkg_conf_t *conf, opkg_option_t **options)
{ "noaction", OPKG_OPT_TYPE_INT, &conf->noaction },
{ "nodeps", OPKG_OPT_TYPE_BOOL, &conf->nodeps },
{ "offline_root", OPKG_OPT_TYPE_STRING, &conf->offline_root },
+ { "offline_root_path", OPKG_OPT_TYPE_STRING, &conf->offline_root_path },
{ "offline_root_post_script_cmd", OPKG_OPT_TYPE_STRING, &conf->offline_root_post_script_cmd },
{ "offline_root_pre_script_cmd", OPKG_OPT_TYPE_STRING, &conf->offline_root_pre_script_cmd },
{ "proxy_passwd", OPKG_OPT_TYPE_STRING, &conf->proxy_passwd },
@@ -266,6 +267,8 @@ int opkg_conf_init(opkg_conf_t *conf, const args_t *args)
opkg_conf_override_string(&conf->offline_root,
args->offline_root);
+ opkg_conf_override_string(&conf->offline_root_path,
+ args->offline_root_path);
opkg_conf_override_string(&conf->offline_root_pre_script_cmd,
args->offline_root_pre_script_cmd);
opkg_conf_override_string(&conf->offline_root_post_script_cmd,
@@ -338,6 +341,7 @@ void opkg_conf_deinit(opkg_conf_t *conf)
hash_table_deinit(&conf->obs_file_hash);
opkg_conf_free_string(&conf->offline_root);
+ opkg_conf_free_string(&conf->offline_root_path);
opkg_conf_free_string(&conf->offline_root_pre_script_cmd);
opkg_conf_free_string(&conf->offline_root_post_script_cmd);