2005-03-14 20:51:43 -05:00
|
|
|
/*
|
|
|
|
* deps.h
|
2007-11-16 21:18:45 -05:00
|
|
|
*
|
2006-01-02 14:55:35 -05:00
|
|
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
2006-10-15 15:31:03 -04:00
|
|
|
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
|
|
|
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
2007-11-16 21:18:45 -05:00
|
|
|
*
|
2005-03-14 20:51:43 -05: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
|
|
|
|
* along with this program; if not, write to the Free Software
|
2007-11-16 21:18:45 -05:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
2005-03-14 20:51:43 -05:00
|
|
|
* USA.
|
|
|
|
*/
|
|
|
|
#ifndef _ALPM_DEPS_H
|
|
|
|
#define _ALPM_DEPS_H
|
|
|
|
|
|
|
|
#include "db.h"
|
|
|
|
#include "sync.h"
|
2006-11-22 04:03:41 -05:00
|
|
|
#include "package.h"
|
2006-11-20 04:10:23 -05:00
|
|
|
#include "alpm.h"
|
2005-03-14 20:51:43 -05:00
|
|
|
|
2006-11-20 04:10:23 -05:00
|
|
|
/* Dependency */
|
|
|
|
struct __pmdepend_t {
|
2007-01-23 22:02:53 -05:00
|
|
|
pmdepmod_t mod;
|
2005-03-29 15:31:03 -05:00
|
|
|
char name[PKG_NAME_LEN];
|
|
|
|
char version[PKG_VERSION_LEN];
|
2006-11-20 04:10:23 -05:00
|
|
|
};
|
2005-03-29 15:31:03 -05:00
|
|
|
|
2006-11-20 04:10:23 -05:00
|
|
|
/* Missing dependency */
|
|
|
|
struct __pmdepmissing_t {
|
2005-03-29 15:31:03 -05:00
|
|
|
char target[PKG_NAME_LEN];
|
|
|
|
pmdepend_t depend;
|
2006-11-20 04:10:23 -05:00
|
|
|
};
|
2005-03-29 15:31:03 -05:00
|
|
|
|
2007-06-10 17:51:20 -04: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 08:25:43 -05:00
|
|
|
pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdepmod_t depmod,
|
|
|
|
const char *depname, const char *depversion);
|
2007-01-31 03:10:01 -05:00
|
|
|
alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode);
|
2007-11-14 06:42:15 -05:00
|
|
|
void _alpm_recursedeps(pmdb_t *db, alpm_list_t *targs, int include_explicit);
|
2007-01-23 22:02:53 -05:00
|
|
|
int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,
|
2007-08-12 16:26:54 -04:00
|
|
|
alpm_list_t **list, alpm_list_t *remove, pmtrans_t *trans, alpm_list_t **data);
|
2005-03-14 20:51:43 -05:00
|
|
|
|
|
|
|
#endif /* _ALPM_DEPS_H */
|
|
|
|
|
|
|
|
/* vim: set ts=2 sw=2 noet: */
|