2 * dpkg - main program for package management
3 * force.h - forced operation support
5 * Copyright © 1995 Ian Jackson <ijackson@chiark.greenend.org.uk>
6 * Copyright © 2006, 2008-2019 Guillem Jover <guillem@debian.org>
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.
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.
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/>.
25 #include <dpkg/dpkg.h>
26 #include <dpkg/options.h>
28 enum DPKG_ATTR_ENUM_FLAGS force_flags
{
29 FORCE_ARCHITECTURE
= DPKG_BIT(0),
30 FORCE_BAD_PATH
= DPKG_BIT(1),
31 FORCE_BAD_VERIFY
= DPKG_BIT(2),
32 FORCE_BAD_VERSION
= DPKG_BIT(3),
33 FORCE_BREAKS
= DPKG_BIT(4),
34 FORCE_CONFF_ASK
= DPKG_BIT(5),
35 FORCE_CONFF_DEF
= DPKG_BIT(6),
36 FORCE_CONFF_MISS
= DPKG_BIT(7),
37 FORCE_CONFF_NEW
= DPKG_BIT(8),
38 FORCE_CONFF_OLD
= DPKG_BIT(9),
39 FORCE_CONFIGURE_ANY
= DPKG_BIT(10),
40 FORCE_CONFLICTS
= DPKG_BIT(11),
41 FORCE_DEPENDS
= DPKG_BIT(12),
42 FORCE_DEPENDS_VERSION
= DPKG_BIT(13),
43 FORCE_DOWNGRADE
= DPKG_BIT(14),
44 FORCE_HOLD
= DPKG_BIT(15),
45 FORCE_NON_ROOT
= DPKG_BIT(16),
46 FORCE_OVERWRITE
= DPKG_BIT(17),
47 FORCE_OVERWRITE_DIR
= DPKG_BIT(18),
48 FORCE_OVERWRITE_DIVERTED
= DPKG_BIT(19),
49 FORCE_REMOVE_ESSENTIAL
= DPKG_BIT(20),
50 FORCE_REMOVE_REINSTREQ
= DPKG_BIT(21),
51 FORCE_SCRIPT_CHROOTLESS
= DPKG_BIT(22),
52 FORCE_UNSAFE_IO
= DPKG_BIT(23),
53 FORCE_STATOVERRIDE_ADD
= DPKG_BIT(24),
54 FORCE_STATOVERRIDE_DEL
= DPKG_BIT(25),
55 FORCE_SECURITY_MAC
= DPKG_BIT(26),
56 FORCE_REMOVE_PROTECTED
= DPKG_BIT(27),
57 FORCE_ALL
= 0xffffffff,
65 reset_force(int flags
);
68 get_force_string(void);
71 parse_force(const char *value
, bool set
);
74 set_force_default(int mask
);
76 set_force_option(const struct cmdinfo
*cip
, const char *value
);
78 reset_force_option(const struct cmdinfo
*cip
, const char *value
);
81 forcibleerr(int forceflag
, const char *format
, ...) DPKG_ATTR_PRINTF(2);
83 forcible_nonroot_error(int rc
);
85 #endif /* DPKG_FORCE_H */