-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpkgset-req.h
60 lines (46 loc) · 1.66 KB
/
pkgset-req.h
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
/*
Copyright (C) 2000 - 2008 Pawel A. Gajda <[email protected]>
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 file COPYING for details).
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef POLDEK_PSREQ_H
#define POLDEK_PSREQ_H
#include <limits.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <trurl/nassert.h>
#include <trurl/narray.h>
#include <trurl/nhash.h>
#include "pkg.h"
#define REQPKG_PREREQ (1 << 0)
#define REQPKG_PREREQ_UN (1 << 1)
#define REQPKG_CONFLICT (1 << 2)
#define REQPKG_OBSOLETE (1 << 3)
#define REQPKG_MULTI (1 << 7) /* with alternatives */
struct reqpkg {
struct pkg *pkg;
struct capreq *req;
uint8_t flags;
struct reqpkg *adds[0]; /* NULL terminated */
};
struct pkgset;
/*
Find requirement looking into capabilities and file list.
RET: bool && matched packages in *packages
*/
int pkgset_find_match_packages(struct pkgset *ps,
const struct pkg *pkg, const struct capreq *req,
tn_array **packages, int strict);
int pkgset_verify_deps(struct pkgset *ps, int strict);
int pkgset_verify_conflicts(struct pkgset *ps, int strict);
tn_array *pspkg_obsoletedby(struct pkgset *ps, struct pkg *pkg, int bymarked);
struct pkg_unreq {
uint8_t mismatch;
char req[0];
};
#endif /* POLDEK_PSREQ_H */