From e63366ae5e701d8e9ae33144f68e8786b092a468 Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Sun, 18 Nov 2007 18:45:46 +0100 Subject: New remove option : -u / --unneeded (FS#6505). With --unneeded option 'pacman -R' doesn't stop in case of dependency error; it removes the needed-dependency targets from the target-list instead. See also: http://archlinux.org/pipermail/pacman-dev/2007-October/009653.html . The patch also adds a new causingpkg field to pmdepmissing_t which indicates the to-be-removed package which would cause a dependency break. This is needed, because miss->depend.name may be a provision. miss->causingpkg will be useful in -R dependency error messages too. [Xavier: renamed inducer to causingpkg, removed the _alpm_pkgname_pkg_cmp helper function as requested by Aaron. This might be added by a further commit. Other small cleanups, updated manpage and bash completion.] Signed-off-by: Chantry Xavier --- lib/libalpm/deps.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/deps.h') diff --git a/lib/libalpm/deps.h b/lib/libalpm/deps.h index fdbfebed..439a92a2 100644 --- a/lib/libalpm/deps.h +++ b/lib/libalpm/deps.h @@ -37,6 +37,7 @@ struct __pmdepend_t { struct __pmdepmissing_t { char *target; pmdepend_t *depend; + char *causingpkg; /* this is used in case of remove dependency error only */ }; /* Graphs */ @@ -51,7 +52,8 @@ struct __pmgraph_t { void _alpm_dep_free(pmdepend_t *dep); pmdepend_t *_alpm_dep_dup(const pmdepend_t *dep); -pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdepend_t *dep); +pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdepend_t *dep, + const char *causinpkg); void _alpm_depmiss_free(pmdepmissing_t *miss); alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode); void _alpm_recursedeps(pmdb_t *db, alpm_list_t *targs, int include_explicit); -- cgit v1.2.3-24-g4f1b