2005-03-14 20:51:43 -05:00
|
|
|
/*
|
|
|
|
* deps.h
|
|
|
|
*
|
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>
|
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
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
|
|
* 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];
|
2007-01-23 22:02:53 -05:00
|
|
|
pmdeptype_t type;
|
2005-03-29 15:31:03 -05:00
|
|
|
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-01-23 22:02:53 -05:00
|
|
|
pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdeptype_t type,
|
|
|
|
pmdepmod_t depmod, const char *depname,
|
|
|
|
const char *depversion);
|
2007-01-19 04:28:44 -05:00
|
|
|
int _alpm_depmiss_isin(pmdepmissing_t *needle, alpm_list_t *haystack);
|
2007-01-31 03:10:01 -05:00
|
|
|
alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode);
|
2007-01-23 22:02:53 -05:00
|
|
|
alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op,
|
|
|
|
alpm_list_t *packages);
|
2007-01-19 04:28:44 -05:00
|
|
|
alpm_list_t *_alpm_removedeps(pmdb_t *db, alpm_list_t *targs);
|
2007-01-23 22:02:53 -05:00
|
|
|
int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,
|
|
|
|
alpm_list_t *list, alpm_list_t *trail, 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: */
|