dpkg 1.21.11
force.h
Go to the documentation of this file.
1/*
2 * dpkg - main program for package management
3 * force.h - forced operation support
4 *
5 * Copyright © 1995 Ian Jackson <ijackson@chiark.greenend.org.uk>
6 * Copyright © 2006, 2008-2019 Guillem Jover <guillem@debian.org>
7 *
8 * This is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22#ifndef DPKG_FORCE_H
23#define DPKG_FORCE_H
24
25#include <dpkg/dpkg.h>
26#include <dpkg/options.h>
27
57 FORCE_ALL = 0xffffffff,
58};
59
60bool
61in_force(int flags);
62void
63set_force(int flags);
64void
65reset_force(int flags);
66
67char *
69
70void
71parse_force(const char *value, bool set);
72
73void
74set_force_default(int mask);
75void
76set_force_option(const struct cmdinfo *cip, const char *value);
77void
78reset_force_option(const struct cmdinfo *cip, const char *value);
79
80void
81forcibleerr(int forceflag, const char *format, ...) DPKG_ATTR_PRINTF(2);
82int
84
85#endif /* DPKG_FORCE_H */
void parse_force(const char *value, bool set)
Definition: force.c:284
char * get_force_string(void)
Definition: force.c:242
force_flags
Definition: force.h:28
@ FORCE_REMOVE_PROTECTED
Definition: force.h:56
@ FORCE_NON_ROOT
Definition: force.h:45
@ FORCE_OVERWRITE_DIVERTED
Definition: force.h:48
@ FORCE_REMOVE_REINSTREQ
Definition: force.h:50
@ FORCE_CONFF_MISS
Definition: force.h:36
@ FORCE_BAD_VERIFY
Definition: force.h:31
@ FORCE_CONFF_DEF
Definition: force.h:35
@ FORCE_DEPENDS
Definition: force.h:41
@ FORCE_STATOVERRIDE_ADD
Definition: force.h:53
@ FORCE_CONFIGURE_ANY
Definition: force.h:39
@ FORCE_HOLD
Definition: force.h:44
@ FORCE_BREAKS
Definition: force.h:33
@ FORCE_OVERWRITE_DIR
Definition: force.h:47
@ FORCE_STATOVERRIDE_DEL
Definition: force.h:54
@ FORCE_BAD_PATH
Definition: force.h:30
@ FORCE_ALL
Definition: force.h:57
@ FORCE_OVERWRITE
Definition: force.h:46
@ FORCE_UNSAFE_IO
Definition: force.h:52
@ FORCE_ARCHITECTURE
Definition: force.h:29
@ FORCE_SECURITY_MAC
Definition: force.h:55
@ FORCE_BAD_VERSION
Definition: force.h:32
@ FORCE_CONFF_OLD
Definition: force.h:38
@ FORCE_CONFF_NEW
Definition: force.h:37
@ FORCE_DEPENDS_VERSION
Definition: force.h:42
@ FORCE_CONFLICTS
Definition: force.h:40
@ FORCE_CONFF_ASK
Definition: force.h:34
@ FORCE_SCRIPT_CHROOTLESS
Definition: force.h:51
@ FORCE_DOWNGRADE
Definition: force.h:43
@ FORCE_REMOVE_ESSENTIAL
Definition: force.h:49
void set_force(int flags)
Definition: force.c:230
void set_force_option(const struct cmdinfo *cip, const char *value)
Definition: force.c:370
void forcibleerr(int forceflag, const char *format,...) DPKG_ATTR_PRINTF(2)
Definition: force.c:384
void reset_force_option(const struct cmdinfo *cip, const char *value)
Definition: force.c:378
int forcible_nonroot_error(int rc)
Definition: force.c:399
bool in_force(int flags)
Definition: force.c:224
void reset_force(int flags)
Definition: force.c:236
void set_force_default(int mask)
Definition: force.c:348
#define DPKG_ATTR_PRINTF(n)
Definition: macros.h:56
#define DPKG_BIT(n)
Return the integer value of bit n.
Definition: macros.h:125
Definition: options.h:38