~ubuntu-branches/ubuntu/maverick/aptitude/maverick

« back to all changes in this revision

Viewing changes to debian/patches/fix-resolver-crash-578344

  • Committer: Steve Langasek
  • Date: 2010-07-08 00:11:10 UTC
  • mfrom: (1.1.17 sid)
  • Revision ID: steve.langasek@canonical.com-20100708001110-ycbfg1j1wc95ucxe
mergeĀ versionĀ 0.6.2.1-2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Patch from upstream to fix crashes in the resolver.
 
2
Origin: upstream, http://hg.debian.org/hg/aptitude/head/rev/b1438b17e637
 
3
Bug: http://bugs.debian.org/578344
 
4
Forwarded: not-needed
 
5
Author: Daniel Burrows <dburrows@debian.org>
 
6
Applied-Upstream: http://hg.debian.org/hg/aptitude/head/rev/b1438b17e637
 
7
Index: aptitude-0.6.2/src/generic/problemresolver/promotion_set.h
 
8
===================================================================
 
9
--- aptitude-0.6.2.orig/src/generic/problemresolver/promotion_set.h     2010-04-19 06:54:44.180978398 -0700
 
10
+++ aptitude-0.6.2/src/generic/problemresolver/promotion_set.h  2010-04-19 06:55:07.828278340 -0700
 
11
@@ -151,8 +151,16 @@
 
12
 
 
13
     // Note that this will compute a somewhat inefficient validity
 
14
     // condition when applied across several expressions.
 
15
-    cwidget::util::ref_ptr<expression<bool> > new_valid =
 
16
-      and_e::create(p1_valid, p2_valid);
 
17
+    cwidget::util::ref_ptr<expression<bool> > new_valid;
 
18
+    if(p1_valid.valid())
 
19
+      {
 
20
+        if(p2_valid.valid())
 
21
+          new_valid = and_e::create(p1_valid, p2_valid);
 
22
+        else
 
23
+          new_valid = p1_valid;
 
24
+      }
 
25
+    else
 
26
+      new_valid = p2_valid;
 
27
 
 
28
     return generic_promotion(new_choices, new_cost, new_valid);
 
29
   }