2005-03-14 20:51:43 -05:00
|
|
|
/*
|
|
|
|
* deps.h
|
2007-11-16 21:18:45 -05:00
|
|
|
*
|
2010-03-14 20:46:59 -04:00
|
|
|
* Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
|
2009-07-01 03:08:33 -04: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
|
2007-12-10 23:55:22 -05:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2005-03-14 20:51:43 -05:00
|
|
|
*/
|
|
|
|
#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 {
|
2008-01-11 01:01:58 -05:00
|
|
|
char *name;
|
|
|
|
char *version;
|
2010-12-29 20:11:54 -05:00
|
|
|
unsigned long name_hash;
|
2010-12-21 16:40:04 -05:00
|
|
|
pmdepmod_t mod;
|
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 {
|
2008-01-11 01:01:58 -05:00
|
|
|
char *target;
|
2008-01-11 02:00:15 -05:00
|
|
|
pmdepend_t *depend;
|
2007-11-18 12:45:46 -05:00
|
|
|
char *causingpkg; /* this is used in case of remove dependency error only */
|
2006-11-20 04:10:23 -05:00
|
|
|
};
|
2005-03-29 15:31:03 -05:00
|
|
|
|
2008-01-11 02:00:15 -05:00
|
|
|
void _alpm_dep_free(pmdepend_t *dep);
|
|
|
|
pmdepend_t *_alpm_dep_dup(const pmdepend_t *dep);
|
2007-11-18 12:45:46 -05:00
|
|
|
pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdepend_t *dep,
|
|
|
|
const char *causinpkg);
|
2008-01-11 01:01:58 -05:00
|
|
|
void _alpm_depmiss_free(pmdepmissing_t *miss);
|
2008-03-16 17:36:31 -04:00
|
|
|
alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, int reverse);
|
2007-11-14 06:42:15 -05:00
|
|
|
void _alpm_recursedeps(pmdb_t *db, alpm_list_t *targs, int include_explicit);
|
2009-02-22 05:25:32 -05:00
|
|
|
pmpkg_t *_alpm_resolvedep(pmdepend_t *dep, alpm_list_t *dbs, alpm_list_t *excluding, int prompt);
|
2010-05-16 20:33:28 -04:00
|
|
|
int _alpm_resolvedeps(alpm_list_t *localpkgs, alpm_list_t *dbs_sync, pmpkg_t *pkg,
|
2009-03-08 16:56:13 -04:00
|
|
|
alpm_list_t *preferred, alpm_list_t **packages, alpm_list_t *remove,
|
|
|
|
alpm_list_t **data);
|
2008-07-01 16:53:13 -04:00
|
|
|
int _alpm_dep_edge(pmpkg_t *pkg1, pmpkg_t *pkg2);
|
2008-01-21 19:28:05 -05:00
|
|
|
pmdepend_t *_alpm_splitdep(const char *depstring);
|
2008-07-04 09:39:26 -04:00
|
|
|
pmpkg_t *_alpm_find_dep_satisfier(alpm_list_t *pkgs, pmdepend_t *dep);
|
2010-10-12 15:47:40 -04:00
|
|
|
int _alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep);
|
2005-03-14 20:51:43 -05:00
|
|
|
|
|
|
|
#endif /* _ALPM_DEPS_H */
|
|
|
|
|
|
|
|
/* vim: set ts=2 sw=2 noet: */
|