opkg: adding cache support
[oweals/opkg-lede.git] / libopkg / opkg.c
index 4123611f1bfbb98987a3cbc6814bfbddbe441edf..7e6775552607a871cb971a5fbb147573d2adabb1 100644 (file)
@@ -273,6 +273,12 @@ opkg_re_read_config_files (opkg_t *opkg)
     a->offline_root_post_script_cmd = strdup (c->offline_root_post_script_cmd);
   }
 
+  if (c->cache) {
+    if (a->cache)
+       free (a->cache);
+    a->cache = strdup(c->cache);
+  }
+
   /* throw away old opkg_conf and start again */
   opkg_conf_deinit (opkg->conf);
   opkg_conf_init (opkg->conf, opkg->args);