FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 04-19-2008, 08:35 PM
Nagy Gabor
 
Default Fix for remove052.py by moving recursedeps before checkdeps

>From 606d2a931da6f2d942cfc15ddc9400ecc4596a7b Mon Sep 17 00:00:00 2001
From: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Date: Sat, 19 Apr 2008 22:31:22 +0200
Subject: [PATCH] Fix for remove052.py by moving recursedeps before checkdeps

Now -Rs is processed in the plausible way: first pull the dependencies then call checkdeps.
Note: -Rs is a little bit slower now, because we shouldn't check the pulled deps

In case of -Rcs we keep the old behavior because the bug cannot happen there
and we must pull the pulled targets' deps too.

Ref.: http://www.archlinux.org/pipermail/pacman-dev/2008-April/011569.html

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
---
lib/libalpm/remove.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index dfdcabe..556d175 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -96,6 +96,11 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
return(0);
}

+ if((trans->flags & PM_TRANS_FLAG_RECURSE) && !(trans->flags & PM_TRANS_FLAG_CASCADE)) {
+ _alpm_log(PM_LOG_DEBUG, "finding removable dependencies
");
+ _alpm_recursedeps(db, trans->packages, trans->flags & PM_TRANS_FLAG_RECURSEALL);
+ }
+
if(!(trans->flags & PM_TRANS_FLAG_NODEPS)) {
EVENT(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);

@@ -163,7 +168,8 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
alpm_list_free(trans->packages);
trans->packages = lp;

- if(trans->flags & PM_TRANS_FLAG_RECURSE) {
+ /* -Rcs == -Rc then -Rs */
+ if((trans->flags & PM_TRANS_FLAG_CASCADE) && (trans->flags & PM_TRANS_FLAG_RECURSE)) {
_alpm_log(PM_LOG_DEBUG, "finding removable dependencies
");
_alpm_recursedeps(db, trans->packages, trans->flags & PM_TRANS_FLAG_RECURSEALL);
}
--
1.5.3.8


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 07:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org