apk_solver_data.h 1.52 KB
Newer Older
1 2 3 4 5 6
/* apk_solver_data.h - Alpine Package Keeper (APK)
 *
 * Copyright (C) 2005-2008 Natanael Copa <n@tanael.org>
 * Copyright (C) 2008-2012 Timo Teräs <timo.teras@iki.fi>
 * All rights reserved.
 *
7
 * SPDX-License-Identifier: GPL-2.0-only
8 9 10 11 12
 */

#ifndef APK_SOLVER_DATA_H
#define APK_SOLVER_DATA_H

13
#include <stdint.h>
14 15 16 17 18
#include "apk_defines.h"
#include "apk_provider_data.h"

struct apk_solver_name_state {
	struct apk_provider chosen;
19 20 21 22 23 24 25 26 27 28
	union {
		struct {
			struct list_head dirty_list;
			struct list_head unresolved_list;
		};
		struct {
			struct apk_name *installed_name;
			struct apk_package *installed_pkg;
		};
	};
29
	unsigned short requirers;
30 31
	unsigned short merge_depends;
	unsigned short merge_provides;
32 33
	unsigned short max_dep_chain;
	unsigned seen : 1;
34
	unsigned locked : 1;
35 36 37 38
	unsigned in_changeset : 1;
	unsigned reevaluate_deps : 1;
	unsigned reevaluate_iif : 1;
	unsigned has_iif : 1;
39
	unsigned no_iif : 1;
40
	unsigned has_options : 1;
41
	unsigned reverse_deps_done : 1;
42
	unsigned has_virtual_provides : 1;
43
};
44

45
struct apk_solver_package_state {
46 47
	unsigned int conflicts;
	unsigned short max_dep_chain;
48 49
	unsigned short pinning_allowed;
	unsigned short pinning_preferred;
50 51
	unsigned solver_flags : 6;
	unsigned solver_flags_inheritable : 6;
52
	unsigned seen : 1;
53 54
	unsigned pkg_available : 1;
	unsigned pkg_selectable : 1;
55 56
	unsigned tag_ok : 1;
	unsigned tag_preferred : 1;
Timo Teräs's avatar
Timo Teräs committed
57 58
	unsigned dependencies_used : 1;
	unsigned dependencies_merged : 1;
59 60
	unsigned in_changeset : 1;
	unsigned iif_triggered : 1;
61
	unsigned iif_failed : 1;
62
	unsigned error : 1;
63 64 65
};

#endif