From: Florian Festi Date: Tue, 14 Apr 2009 08:57:46 +0000 (+0200) Subject: Revert erase relations before checking whether we already added it X-Git-Tag: rpm-4.8.0-beta1~525 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1880778844ae92f56f7a329402efd29a24b819df;p=platform%2Fupstream%2Frpm.git Revert erase relations before checking whether we already added it --- diff --git a/lib/depends.c b/lib/depends.c index 71bf71e..326556f 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -918,13 +918,6 @@ static inline int addRelation(rpmts ts, if (ignoreDep(ts, p, q)) return 0; - /* Avoid redundant relations. */ - /* as we add all relations for p at once - only the latest added relation - can be from p already */ - if (p==q || rpmteTSI(q)->tsi_suc == p) - return 0; - /* Erasures are reversed installs. */ if (teType == TR_REMOVED) { rpmte r = p; @@ -932,6 +925,13 @@ static inline int addRelation(rpmts ts, q = r; } + /* Avoid redundant relations. */ + /* as we add all relations for p at once + only the latest added relation + can be from p already */ + if (p==q || rpmteTSI(q)->tsi_suc == p) + return 0; + /* T3. Record next "q <- p" relation (i.e. "p" requires "q"). */ rpmteTSI(p)->tsi_count++; /* bump p predecessor count */