1 /* opkg_conf.h - the opkg package management system
5 Copyright (C) 2001 University of Southern California
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2, or (at
10 your option) any later version.
12 This program is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
21 typedef struct opkg_conf opkg_conf_t;
22 extern opkg_conf_t *conf;
28 #include "hash_table.h"
29 #include "pkg_src_list.h"
30 #include "pkg_dest_list.h"
31 #include "nv_pair_list.h"
33 #define OPKG_CONF_DEFAULT_TMP_DIR_BASE "/tmp"
34 #define OPKG_CONF_TMP_DIR_SUFFIX "opkg-XXXXXX"
35 #define OPKG_CONF_LISTS_DIR OPKG_STATE_DIR_PREFIX "/lists"
37 #define OPKG_CONF_DEFAULT_CONF_FILE_DIR OPKGETCDIR"/opkg"
39 /* In case the config file defines no dest */
40 #define OPKG_CONF_DEFAULT_DEST_NAME "root"
41 #define OPKG_CONF_DEFAULT_DEST_ROOT_DIR "/"
43 #define OPKG_CONF_DEFAULT_HASH_LEN 1024
47 pkg_src_list_t pkg_src_list;
48 pkg_dest_list_t pkg_dest_list;
49 pkg_dest_list_t tmp_dest_list;
50 nv_pair_list_t arch_list;
52 int restrict_to_default_dest;
53 pkg_dest_t *default_dest;
61 unsigned int pfm; /* package field mask */
63 /* For libopkg users to capture messages. */
64 void (*opkg_vmessage)(int, const char *fmt, va_list ap);
75 int force_removal_of_dependent_packages;
76 int force_removal_of_essential_packages;
77 int force_postinstall;
80 int nodeps; /* do not follow dependencies */
89 /* some options could be used by
90 * wget if curl support isn't builtin
91 * If someone want to try...
101 int ssl_dont_verify_peer;
103 #ifdef HAVE_PATHFINDER
114 char *signature_ca_file;
115 char *signature_ca_path;
117 hash_table_t pkg_hash;
118 hash_table_t file_hash;
119 hash_table_t obs_file_hash;
122 enum opkg_option_type {
127 typedef enum opkg_option_type opkg_option_type_t;
129 typedef struct opkg_option opkg_option_t;
132 const opkg_option_type_t type;
136 int opkg_conf_init(void);
137 int opkg_conf_load(void);
138 void opkg_conf_deinit(void);
140 int opkg_conf_write_status_files(void);
141 char *root_filename_alloc(char *filename);