4 * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
5 * Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 typedef struct __config_t
{
28 unsigned short verbose
;
29 unsigned short version
;
31 unsigned short noconfirm
;
32 unsigned short noprogressbar
;
33 unsigned short logmask
;
35 unsigned short checkspace
;
36 unsigned short usesyslog
;
37 unsigned short usedelta
;
40 /* unfortunately, we have to keep track of paths both here and in the library
41 * because they can come from both the command line or config file, and we
42 * need to ensure we get the order of preference right. */
48 alpm_list_t
*cachedirs
;
50 unsigned short op_q_isfile
;
51 unsigned short op_q_info
;
52 unsigned short op_q_list
;
53 unsigned short op_q_foreign
;
54 unsigned short op_q_unrequired
;
55 unsigned short op_q_deps
;
56 unsigned short op_q_explicit
;
57 unsigned short op_q_owns
;
58 unsigned short op_q_search
;
59 unsigned short op_q_changelog
;
60 unsigned short op_q_upgrade
;
61 unsigned short op_q_check
;
63 unsigned short op_s_clean
;
64 unsigned short op_s_downloadonly
;
65 unsigned short op_s_info
;
66 unsigned short op_s_sync
;
67 unsigned short op_s_search
;
68 unsigned short op_s_upgrade
;
73 alpm_transflag_t flags
;
74 pgp_verify_t sigverify
;
76 /* conf file options */
79 /* format target pkg lists as table */
80 unsigned short verbosepkglists
;
81 /* When downloading, display the amount downloaded, rate, ETA, and percent
82 * downloaded of the total download list */
83 unsigned short totaldownload
;
84 /* select -Sc behavior */
85 unsigned short cleanmethod
;
87 alpm_list_t
*syncfirst
;
88 alpm_list_t
*ignorepkg
;
89 alpm_list_t
*ignoregrp
;
90 alpm_list_t
*noupgrade
;
91 alpm_list_t
*noextract
;
94 /* our connection to libalpm */
95 alpm_handle_t
*handle
;
109 /* Long Operations */
131 PM_CLEAN_KEEPINST
= 1,
132 PM_CLEAN_KEEPCUR
= (1 << 1)
135 /* global config variable */
136 extern config_t
*config
;
138 config_t
*config_new(void);
139 int config_free(config_t
*oldconfig
);
141 int config_set_arch(const char *arch
);
142 int parseconfig(const char *file
);
143 #endif /* _PM_CONF_H */
145 /* vim: set ts=2 sw=2 noet: */