2005-03-15 01:51:43 +00:00
|
|
|
/*
|
|
|
|
* deps.h
|
2007-11-16 20:18:45 -06:00
|
|
|
*
|
2007-12-10 22:55:22 -06:00
|
|
|
* Copyright (c) 2002-2007 by Judd Vinet <jvinet@zeroflux.org>
|
2006-10-15 19:31:03 +00:00
|
|
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
|
|
|
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
2007-11-16 20:18:45 -06:00
|
|
|
*
|
2005-03-15 01:51:43 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2007-12-10 22:55:22 -06:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2005-03-15 01:51:43 +00:00
|
|
|
*/
|
|
|
|
#ifndef _ALPM_DEPS_H
|
|
|
|
#define _ALPM_DEPS_H
|
|
|
|
|
|
|
|
#include "db.h"
|
|
|
|
#include "sync.h"
|
2006-11-22 09:03:41 +00:00
|
|
|
#include "package.h"
|
2006-11-20 09:10:23 +00:00
|
|
|
#include "alpm.h"
|
2005-03-15 01:51:43 +00:00
|
|
|
|
2006-11-20 09:10:23 +00:00
|
|
|
/* Dependency */
|
|
|
|
struct __pmdepend_t {
|
2007-01-24 03:02:53 +00:00
|
|
|
pmdepmod_t mod;
|
2008-01-11 00:01:58 -06:00
|
|
|
char *name;
|
|
|
|
char *version;
|
2006-11-20 09:10:23 +00:00
|
|
|
};
|
2005-03-29 20:31:03 +00:00
|
|
|
|
2006-11-20 09:10:23 +00:00
|
|
|
/* Missing dependency */
|
|
|
|
struct __pmdepmissing_t {
|
2008-01-11 00:01:58 -06:00
|
|
|
char *target;
|
2005-03-29 20:31:03 +00:00
|
|
|
pmdepend_t depend;
|
2006-11-20 09:10:23 +00:00
|
|
|
};
|
2005-03-29 20:31:03 +00:00
|
|
|
|
2007-06-10 23:51:20 +02:00
|
|
|
/* Graphs */
|
|
|
|
struct __pmgraph_t {
|
|
|
|
int state; /* 0: untouched, -1: entered, other: leaving time */
|
|
|
|
void *data;
|
|
|
|
struct __pmgraph_t *parent; /* where did we come from? */
|
|
|
|
alpm_list_t *children;
|
|
|
|
alpm_list_t *childptr; /* points to a child in children list */
|
|
|
|
};
|
|
|
|
|
2007-11-18 14:25:43 +01:00
|
|
|
pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdepmod_t depmod,
|
|
|
|
const char *depname, const char *depversion);
|
2008-01-11 00:01:58 -06:00
|
|
|
void _alpm_depmiss_free(pmdepmissing_t *miss);
|
2007-01-31 08:10:01 +00:00
|
|
|
alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode);
|
2007-11-14 12:42:15 +01:00
|
|
|
void _alpm_recursedeps(pmdb_t *db, alpm_list_t *targs, int include_explicit);
|
2007-01-24 03:02:53 +00:00
|
|
|
int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,
|
2007-08-12 22:26:54 +02:00
|
|
|
alpm_list_t **list, alpm_list_t *remove, pmtrans_t *trans, alpm_list_t **data);
|
2005-03-15 01:51:43 +00:00
|
|
|
|
|
|
|
#endif /* _ALPM_DEPS_H */
|
|
|
|
|
|
|
|
/* vim: set ts=2 sw=2 noet: */
|