A few final changes for the 3.0.6 release
[pacman.git] / lib / libalpm / deps.h
blob8f3a9b9180f4394a77954cdce92f2b17a0b6d3e8
1 /*
2 * deps.h
3 *
4 * Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
5 * Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
6 * Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
7 *
8 * This program 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 program 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, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
21 * USA.
23 #ifndef _ALPM_DEPS_H
24 #define _ALPM_DEPS_H
26 #include "db.h"
27 #include "sync.h"
28 #include "package.h"
29 #include "alpm.h"
31 /* Dependency */
32 struct __pmdepend_t {
33 pmdepmod_t mod;
34 char name[PKG_NAME_LEN];
35 char version[PKG_VERSION_LEN];
38 /* Missing dependency */
39 struct __pmdepmissing_t {
40 char target[PKG_NAME_LEN];
41 pmdeptype_t type;
42 pmdepend_t depend;
45 pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdeptype_t type,
46 pmdepmod_t depmod, const char *depname,
47 const char *depversion);
48 int _alpm_depmiss_isin(pmdepmissing_t *needle, alpm_list_t *haystack);
49 alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode);
50 alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op,
51 alpm_list_t *packages);
52 alpm_list_t *_alpm_removedeps(pmdb_t *db, alpm_list_t *targs);
53 int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,
54 alpm_list_t *list, alpm_list_t *trail, pmtrans_t *trans,
55 alpm_list_t **data);
57 #endif /* _ALPM_DEPS_H */
59 /* vim: set ts=2 sw=2 noet: */