Use ignoregroup rather than ignoregrp in the handle
[pacman-ng.git] / src / pacman / conf.h
blob64b911ab94e5aa04f56a923f34c042fddf28d64d
1 /*
2 * conf.h
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/>.
20 #ifndef _PM_CONF_H
21 #define _PM_CONF_H
23 #include <alpm.h>
25 typedef struct __config_t {
26 unsigned short op;
27 unsigned short quiet;
28 unsigned short verbose;
29 unsigned short version;
30 unsigned short help;
31 unsigned short noconfirm;
32 unsigned short noprogressbar;
33 unsigned short logmask;
34 unsigned short print;
35 unsigned short checkspace;
36 unsigned short usesyslog;
37 unsigned short usedelta;
38 char *arch;
39 char *print_format;
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. */
43 char *configfile;
44 char *rootdir;
45 char *dbpath;
46 char *logfile;
47 char *gpgdir;
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;
70 unsigned short group;
71 unsigned short noask;
72 unsigned int ask;
73 alpm_transflag_t flags;
74 pgp_verify_t sigverify;
76 /* conf file options */
77 /* I Love Candy! */
78 unsigned short chomp;
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;
86 alpm_list_t *holdpkg;
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;
92 char *xfercommand;
94 /* our connection to libalpm */
95 alpm_handle_t *handle;
96 } config_t;
98 /* Operations */
99 enum {
100 PM_OP_MAIN = 1,
101 PM_OP_REMOVE,
102 PM_OP_UPGRADE,
103 PM_OP_QUERY,
104 PM_OP_SYNC,
105 PM_OP_DEPTEST,
106 PM_OP_DATABASE
109 /* Long Operations */
110 enum {
111 OP_NOCONFIRM = 1000,
112 OP_CONFIG,
113 OP_IGNORE,
114 OP_DEBUG,
115 OP_NOPROGRESSBAR,
116 OP_NOSCRIPTLET,
117 OP_ASK,
118 OP_CACHEDIR,
119 OP_ASDEPS,
120 OP_LOGFILE,
121 OP_IGNOREGROUP,
122 OP_NEEDED,
123 OP_ASEXPLICIT,
124 OP_ARCH,
125 OP_PRINTFORMAT,
126 OP_GPGDIR
129 /* clean method */
130 enum {
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: */