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
;
26 #include "hash_table.h"
27 #include "pkg_src_list.h"
28 #include "pkg_dest_list.h"
29 #include "nv_pair_list.h"
31 #define OPKG_CONF_DEFAULT_TMP_DIR_BASE "/tmp"
32 #define OPKG_CONF_TMP_DIR_SUFFIX "opkg-XXXXXX"
33 #define OPKG_CONF_LISTS_DIR OPKG_STATE_DIR_PREFIX "/lists"
35 #define OPKG_CONF_DEFAULT_CONF_FILE_DIR OPKGETCDIR"/opkg"
37 /* In case the config file defines no dest */
38 #define OPKG_CONF_DEFAULT_DEST_NAME "root"
39 #define OPKG_CONF_DEFAULT_DEST_ROOT_DIR "/"
41 #define OPKG_CONF_DEFAULT_HASH_LEN 1024
45 pkg_src_list_t pkg_src_list
;
46 pkg_dest_list_t pkg_dest_list
;
47 nv_pair_list_t arch_list
;
49 int restrict_to_default_dest
;
50 pkg_dest_t
*default_dest
;
58 unsigned int pfm
; /* package field mask */
60 /* For libopkg users to capture messages. */
61 void (*opkg_vmessage
)(int, const char *fmt
, va_list ap
);
72 int force_removal_of_dependent_packages
;
73 int force_removal_of_essential_packages
;
75 int nodeps
; /* do not follow dependences */
83 /* some options could be used by
84 * wget if curl support isn't builtin
85 * If someone want to try...
95 int ssl_dont_verify_peer
;
97 #ifdef HAVE_PATHFINDER
108 char *signature_ca_file
;
109 char *signature_ca_path
;
111 hash_table_t pkg_hash
;
112 hash_table_t file_hash
;
113 hash_table_t obs_file_hash
;
116 enum opkg_option_type
{
121 typedef enum opkg_option_type opkg_option_type_t
;
123 typedef struct opkg_option opkg_option_t
;
126 const opkg_option_type_t type
;
130 int opkg_conf_init(void);
131 void opkg_conf_deinit(void);
133 int opkg_conf_write_status_files(void);
134 char *root_filename_alloc(char *filename
);