blob: 5777325b806f559c1b87f1d17ac3962d5606122a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/* 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.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. See http://www.gnu.org/ for details.
*/
#ifndef APK_SOLVER_DATA_H
#define APK_SOLVER_DATA_H
#include <stdint.h>
#include "apk_defines.h"
#include "apk_provider_data.h"
struct apk_score {
union {
struct {
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
unsigned short preference;
unsigned short non_preferred_pinnings;
unsigned short non_preferred_actions;
unsigned short unsatisfied;
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
unsigned short unsatisfied;
unsigned short non_preferred_actions;
unsigned short non_preferred_pinnings;
unsigned short preference;
#else
#error Unknown endianess.
#endif
};
uint64_t score;
};
};
struct apk_solver_name_state {
/* dynamic */
struct list_head unsolved_list;
struct apk_score minimum_penalty;
struct apk_provider chosen;
unsigned int last_touched_decision;
unsigned short requirers;
unsigned short install_ifs;
unsigned short preferred_pinning;
unsigned short locked;
/* one time prepare/finish flags */
unsigned solver_flags_local : 4;
unsigned solver_flags_inheritable : 4;
unsigned decision_counted : 1;
unsigned originally_installed : 1;
unsigned has_available_pkgs : 1;
unsigned in_changeset : 1;
unsigned in_world_dependency : 1;
/* dynamic state flags */
unsigned none_excluded : 1;
unsigned name_touched : 1;
unsigned preferred_chosen : 1;
};
#endif
|