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/alpm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/alpm.h') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 027b1fee..bcc344d8 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -281,7 +281,8 @@ typedef enum _pmtransflag_t { PM_TRANS_FLAG_NOCONFLICTS = 0x800, PM_TRANS_FLAG_PRINTURIS = 0x1000, PM_TRANS_FLAG_NEEDED = 0x2000, - PM_TRANS_FLAG_ALLEXPLICIT = 0x4000 + PM_TRANS_FLAG_ALLEXPLICIT = 0x4000, + PM_TRANS_FLAG_UNNEEDED = 0x8000 } pmtransflag_t; /* Transaction Events */ @@ -378,6 +379,7 @@ alpm_list_t *alpm_deptest(pmdb_t *db, alpm_list_t *targets); const char *alpm_miss_get_target(const pmdepmissing_t *miss); pmdepend_t *alpm_miss_get_dep(pmdepmissing_t *miss); +const char *alpm_miss_get_causingpkg(const pmdepmissing_t *miss); alpm_list_t *alpm_checkdbconflicts(pmdb_t *db_local); -- cgit v1.2.3